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

Threading Question #4

Closed
Randgalt opened this issue Nov 15, 2011 · 1 comment
Closed

Threading Question #4

Randgalt opened this issue Nov 15, 2011 · 1 comment

Comments

@Randgalt
Copy link
Contributor

Re-posting from Eric Tschetter:

Ok, so I have the choice of using the default ZK thread inside curator
and doing handoff manually in my callbacks, or I can pass the
CuratorFramework instance an Executor that it will use for callbacks.
Are all of the recipes written in a thread-safe manner that would
allow me to pass in a 10 thread pool or something, or is the
synchronization model similar to Swing's in that there's only one
thread updating state at a time?

@Randgalt
Copy link
Contributor Author

For any recipe that has a listener/callback mechanism: The listener is called by a single thread owned by the recipe instanced. In all cases you can provide an Executor with your listener so that you can use a different threading model.

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

1 participant