Skip to content Skip to sidebar Skip to footer

Why Asyncio's Run_in_executor Blocks Tornado's Get Handler?

I want to run a slow blocking method (actually from a 3rd-party library) in tornado's async GET request handler. Let the method be just: def blocking_method(uid): print('slow m

Solution 1:

Browsers will recognize that you are trying to load the same page in two different tabs and delay the second request until the first has finished.

http://www.tornadoweb.org/en/latest/faq.html#why-isn-t-this-example-with-time-sleep-running-in-parallel

Post a Comment for "Why Asyncio's Run_in_executor Blocks Tornado's Get Handler?"