Hi all,
Referring to the sample code in this link here, Running a Bokeh server — Bokeh 2.4.2 Documentation
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?
doc.add_next_tick_callback(partial(locked_update, i=res))
Does add_next_tick_callback not get called until the blocking_task executor returns the result?