Understand goless.select from the sample code

Answer #1 0

Since there is no answer so I went to have a dig on the project repo, found a similar question here:

https://github.com/rgalanakis/goless/issues/42

Most notable:

using time.sleep just pauses the current thread. It does not do any switching between coroutines. You would have to use gevent.sleep or a similar mechanism for Stackless (or goless.backend.yield).

So it seemed that I misunderstood the goless would create different threads but I was wrong.

Tags: pythongo

You’ll also like:


© 2023 CodeForDev.com -