lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Sorry if I am standing COMPLETELY on the line.

The points 1 and 3-8 of your list I see completely in your async_main.

But the point 2 "End of nursery block is reached". With this you mean
the end of this do... end block with this "print( 'waiting for child
tasks') " at the end I assume?

How does your nursery get the the info, that this point is reached?
(as at this point the yielding should happen?) (or is the
trio.open_nursery() command repeated on each loop run? ... I am not
really sure about this, sorry...).

... sorry, I think now I get it ... you get it from the <close>
instruction... so your nursery/yielding work in fact starts at the
very end of this variable nursery, when the nursery.close is
invoked.... this sounds nice somehow... . (but you COULD also spend a
command "nursery.async_run()" or so after print... this would be nice
for "long line and happily standing people" like me :) ).

Am Mi., 21. Sept. 2022 um 13:00 Uhr schrieb John Belmonte <>:
> We should just step through the sequence of events in that main_async(), to make this clear:
> 1. nursery is opened, and the two concurrent child tasks are queued
> 2. end of the nursery block is reached (after "waiting for child tasks") --> yield to the scheduler