File tree Expand file tree Collapse file tree
drjava/src/edu/rice/cs/drjava/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 * or removing listeners (writing) at a time, and no reads can occur
5959 * during a write.
6060 * <p>
61- *
61+ * Addendum [Corky March, 2025] In hindsight, the event notification framework is unnecessarily complex and buggy. Essentially
62+ * all event notification code runs in the "dispatch (event-handling) thread". The design should have forced ALL event
63+ * notication code to run in the dispatch thread. Then the read-write locking protocol would be unnecessary. I suspect
64+ * that "adminstrative methods" like addListener and removeListener are accessed from outside of the dispatch thread. In addition,
65+ * some events are signalled by RMI calls from JUnitTestRunner (and elsewhere?) in the slave JVM. The RMI "proxy" thead in
66+ * the main JVM apparently does not route event notifications through the dispatch thread. Ugh.
67+ * <p>
6268 * <i>No</i> methods on this class should be synchronized using traditionalJava synchronization!
6369 * <p>
6470 *
Original file line number Diff line number Diff line change @@ -193,11 +193,11 @@ protected void handleSlaveWontStart(Exception e) {
193193 debug .log ("Slave won't start" , e );
194194 _state .value ().startFailed (e );
195195 }
196-
197-
198196
199197 /*
200198 * === MainJVMRemoteI methods ===
199+ * [Corky March 2025] Should the notifications passed to the InteractionsModel and JUnitModel be delegated to the
200+ * dispatch thread?
201201 */
202202
203203 // TODO: export other objects, such as the interactionsModel, thus avoiding the need to delegate here?
You can’t perform that action at this time.
0 commit comments