> On 5 Sep 2019, at 12:06, Dan Sommers <[email protected]> > wrote: > > Yes, you need some way to produce "back pressure" from downstream to > upstream, and to stop making new work (with new memory consumption) > until there's a place to put it.
It seems that this is the important idea. How does the back pressure work in different use cases. 1) I don't care. Just add items to the queue. (The current API?) 2) I can be blocked when the queue is at a limit. Need an API to allows the block to happen and resumes the code when there is space in the queue. 3) I cannot be blocked as this is async code, but I need a bound on the queue. Maybe call "queue has space" callback when the queue has space? Maybe submit returns an "queue full" status? I have needed all 3 uses cases. Barry
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/H625GQU2HYJ2WQFH6I4O5L3UCAYTQWBW/ Code of Conduct: http://python.org/psf/codeofconduct/
