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.
|