View Single Post
Old 09-10-2019, 04:41 PM   #447
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'd view the wait_for mechanisms as a kind of vsync fence: when you want to make sure everything that you sent *before* a point has been shown on screen (i.e., wait_for_submission(prev_marker) on Kindle, or wait_for_complete(prev_marker) on Kobo) right before sending something new.

And the same when you want to make sure what you've just sent has been shown on screen on its own (wait_for_complete(marker) right after a refresh).

----

In a single-threaded app, you also have to think of when you can actually afford to block (i.e., waiting_for(prev) right before something new is probably more appealing, because there's a chance by the time you need to wait for it, it'll already have gone through, so it won't wait long/at all).

Last edited by NiLuJe; 09-10-2019 at 04:46 PM.
NiLuJe is offline   Reply With Quote