-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow bounded channel to be created with drop delegate (#50331)
* Bounded channel can be created with drop delegate. - Add additional CreateBounded overload with delegate parameter that will be called when item is being dropped from channel - Added unit tests * Fix typo in comment. * Apply suggestions from code review Co-authored-by: Stephen Toub <[email protected]> * Call drop delegate outside of lock statement. * Use overload of CreateBounded method instead of calling ctor directly. * Code review suggestions refactor. * Move Monitor.Enter before try and use local scoped parent variable everywhere. * Drop delegate should not be called while sync lock is held. Enqueuing of new item should be done while sync lock is being held. Added additional tests. * Rerun gitlab CI. * Do not run deadlock test for bounded channels if platform do not support threading. * Apply suggestions from code review Co-authored-by: Ivan Benovic <[email protected]> Co-authored-by: Stephen Toub <[email protected]>
- Loading branch information
1 parent
a913740
commit b47094d
Showing
4 changed files
with
289 additions
and
21 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
Oops, something went wrong.