Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@AllowConcurrentEvents should be used #2

Open
yososs opened this issue Dec 18, 2016 · 3 comments
Open

@AllowConcurrentEvents should be used #2

yososs opened this issue Dec 18, 2016 · 3 comments

Comments

@yososs
Copy link

yososs commented Dec 18, 2016

When parallel performance comparison, should you use @AllowConcurrentEvents annotation for Guava?

@bennidi
Copy link
Owner

bennidi commented Dec 19, 2016

@AllowConcurrentEvents configures an event handler as eligible for multi-threaded invocation. This is the same as using @Handler(dispatch = Invoke.asynchronously) with MBassador. It's a different test scenario which is currently not implemented.

@yososs
Copy link
Author

yososs commented Dec 20, 2016

@handler(dispatch = Invoke.asynchronously)

Is not it the same as using Guava's AsyncEventBus?

AsyncEventBus -> Async Dispatch
EventBus -> Sync Dispatch

@subscribe @AllowConcurrentEvents -> Allow Concurrent Subscribe method
@subscribe -> Disallow Concurrent Subscribe method(Synchronize using synchronized block)

@bennidi
Copy link
Owner

bennidi commented Dec 20, 2016

No. You have to draw a distinction between asynchronous publication (fire and forget) when publishing an event. And the invocation of handlers for a specific event publication (which can be synchronous or asynchronous).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants