RFR: 8325309: Amend "Listeners and Threads" in AWTThreadIssues.html
Alan Snyder
javalists at cbfiddle.com
Fri Feb 9 14:31:39 UTC 2024
I took a look at this file and found a couple of points that I’m not sure about (unrelated to the RFR):
<ul>
<li> <a href="../EventQueue.html#isDispatchThread()"><code>EventQueue.isDispatchThread</code></a>
returns <code>true</code> if and only if the calling thread is the
event dispatch thread started by the machinery;
The statement that events are dispatched on a thread started by AWT (the machinery) seems to
be overly constraining the implementation.
<li> <code>AWTEvents</code> which were actually enqueued to a
particular <code>EventQueue</code> (note that events being
posted to the <code>EventQueue</code> can be coalesced) are
dispatched:
<ul>
<li>
<dl><dt>Sequentially.
<dd> That is, it is not permitted that several events from
this queue are dispatched simultaneously. </dd></dl>
<li>
<dl><dt>In the same order as they are enqueued.
<dd> That is, if <code>AWTEvent</code> A is enqueued
to the <code>EventQueue</code> before
<code>AWTEvent</code> B then event B will not be
dispatched before event A.</dd></dl>
</ul>
I have trouble reconciling this statement of ordering with the implementation that has multiple
priority levels. The only reason to have priority levels to to alter the ordering.
More information about the client-libs-dev
mailing list