This should not be needed and fails if we have multiple contexts
This is used by the queue to schedule putting data into the queue once it has space again. Also implement blocking-wait in the queue on the sinkpad if there is no IOContext upstream and generally clean up various things.