-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Description
Right now the MPSC impl queues producers if getting the grant fails, but the mpsc notifier queue is only for "not full", but a grant can fail for two reasons:
- the queue is full (this is right)
- a grant is already active
Right now we have no way of notifying that a producer grant is complete other than when a grant has been consumed ("not full"). What we want:
- Task A takes a write grant async, gets it
- Task B tries to take a write async, grant is in progress, task B is queued
- Task A commits the grant
- At this point, Task B should be notified
- If a new task, Task C, tries to take a write grant, it should instead be queued instead of getting the grant before B
This also gets tricky if the queue becomes not-full, BUT there is not enough free space for the requested grant. e.g. Task B wants 128B, but the consumer only released a 64B grant.
Metadata
Metadata
Assignees
Labels
No labels