Referring to the sample code in this link here, https://docs.bokeh.org/en/latest/docs/user_guide/server.html#updating-from-unlocked-callbacks
I’m having trouble figuring out when the thread actually starts execution. For this portion here:
# this unlocked callback will not prevent other session callbacks from # executing while it is in flight @gen.coroutine @without_document_lock def unlocked_task(): global i i += 1 res = yield executor.submit(blocking_task, i) doc.add_next_tick_callback(partial(locked_update, i=res))
I hope my question isn’t confusing…
With the generator, does the executor start running blocking_task(i) when i is evaluated to res on the this line?
Does add_next_tick_callback not get called until the blocking_task executor returns the result?