<div dir="ltr">AFAIK No any guarantee</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 27, 2017 at 10:29 AM Chris Jerdonek <<a href="mailto:chris.jerdonek@gmail.com">chris.jerdonek@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a couple questions about asyncio's synchronization primitives.<br>
<br>
Say a coroutine acquires an asyncio Condition's underlying lock, calls<br>
notify() (or notify_all()), and then releases the lock. In terms of<br>
which coroutines will acquire the lock next, is any preference given<br>
between (1) coroutines waiting to acquire the underlying lock, and (2)<br>
coroutines waiting on the Condition object itself? The documentation<br>
doesn't seem to say anything about this.<br>
<br>
Also, more generally (and I'm sure this question gets asked a lot),<br>
does asyncio provide any guarantees about the order in which awaiting<br>
coroutines are awakened? For example, for synchronization primitives,<br>
does each primitive maintain a FIFO queue of who will be awakened<br>
next, or are there no guarantees about the order?<br>
<br>
Thanks a lot,<br>
--Chris<br>
_______________________________________________<br>
Async-sig mailing list<br>
<a href="mailto:Async-sig@python.org" target="_blank">Async-sig@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/async-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/async-sig</a><br>
Code of Conduct: <a href="https://www.python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">https://www.python.org/psf/codeofconduct/</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks,</div>Andrew Svetlov</div></div>