In RingBufferDispatcher (and similarly in WorkQueueDispatcher), there is the following code:
public void execute(final Runnable command) {
ringBuffer.publishEvent(new EventTranslator<RingBufferTask>() {
@Override
public void translateTo(RingBufferTask event, long sequence) {
command.run();
}
});
}
debugging it, I realized that command.run() is executed in the calling thread (so, it's synchronous). This is because publishEvent calls transtateTo.
I was wondering if this is the expected behaviour. Shouldn't it be something like executor.execute(command), or executor.submit(command)?
Cheers!