Open
Description
The DefaultEventBus
is making poor choices in where to publish events.
- The immediate
publish
method publishes to the EDT. Thus if the result of this publish tries to do something on the EDT it will deadlock. - The
publishLater
method usesThreadService.run
, which runs on an arbitrary thread. Thus subsequentpublishLater
calls are not guaranteed to execute in a consistent order.
To resolve this issue, we should have a dedicated SciJava event-processing thread which runs all EventBus
publications.