-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This branch adds implementations of `Sender::send` and `Sender::send_ref` methods for the MPSC channels. This allows a sender to wait for capacity when the channel is full, rather than returning an error. This took a lot of work to get working, and there were some potential deadlocks that had to be fixed. However, it's passing all the loom tests now (finally)! For the blocking version, some `loom` tests currently fail due to an upstream issue (tokio-rs/loom#246). However, the async versions of the same tests (which are not effected by the loom bug) do pass, so we can assume that it's probably correct. Currently, the senders queue themselves to wait using a spinlock around a `VecDeque`, which I don't love at all. But, this works for now, and we can consider switching to an intrusive list strategy later. Signed-off-by: Eliza Weisman <[email protected]>
- Loading branch information
Showing
18 changed files
with
1,472 additions
and
767 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.