scijava / scijava-common

A plugin framework and application container with built-in extensibility mechanism :electric_plug:
BSD 2-Clause "Simplified" License
87 stars 52 forks source link

Run EventBus on dedicated thread #144

Open hinerm opened 9 years ago

hinerm commented 9 years ago

The DefaultEventBus is making poor choices in where to publish events.

To resolve this issue, we should have a dedicated SciJava event-processing thread which runs all EventBus publications.

hinerm commented 9 years ago

@ctrueden Did I get anything wrong here?

ctrueden commented 9 years ago

Looks good, I think.

ctrueden commented 9 years ago

The culprit is this line of code in the DefaultEventBus. The rationale for the change (6b878da41160da695f6552ee86f537cff2443faf) was performance, but unfortunately it comes at the expense of correctness. We will probably have to revert that commit to fix things.