I am trying to understand what eventlet.tpool is useful for. The docs say that tpool.execute() lets you take a blocking function and run it in a new thread. However, the tpool.execute() method itself blocks until the thread is complete! So how is this possibly useful? If I have some blocking/long running function myfunc() and call it directly, it will block. If I call it inside tpool.execute(myfunc) then the tpool.execute(myfunc) call will block. What exactly is the difference?
The only thing I can guess is that when myfunc() is called directly, it not only blocks this coroutine but also prevents other coroutines from running, while calling tpool.execute() will block the current coroutine but somehow yields so that other coroutines can run. Is this the case? Otherwise I don't see how tpool can be useful.