-
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.
Breaking: Remove Disconnect Channel in ChannelReporter implementation
Previously we used a oneshot channel to rendezvous between the reporter and the listener when disconnecting the event channel between them. Doing so was required for `ChannelReporter::disconnect`, to wait for already received events to be handled. A disadvantage of how the listener was setup in conjunction with the reporter, made it difficult to have the thread used by the channel based implementation, return a value (at the end of the scope of the thread, i.e. without more channels). In the new implementation, in Reporter::disconnect, we just use the fact that when all senders of the channel are dropped, the channel will be in a disconnected state. Since already received events may still be processed, we split up the disconnecting and finishing up of the processing of events in two parts. The user is now responsible to wait for the processing of events to finish, instead of the disconnect method. This can be achieved by running FinishProcessing::finish_processing which will block until all events have been processed.
- Loading branch information
1 parent
8c4d485
commit a70922f
Showing
12 changed files
with
293 additions
and
286 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
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
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
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
Oops, something went wrong.