forked from samuel/go-zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an option to supply a callback to be run for each Event.
Background: The channel approach causes lost events during period of scheduling contention. Of particular harm is the loss of HasSession since it's usually the state that triggers actions. The callback approch puts the responsiblity on the caller of the library to decide on the tradeoff between losing events and blocking the main event loop.
- Loading branch information
Showing
1 changed file
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters