How do I do time.sleep in certain thread in Python?

What are the best resources to learn about threads and processes in Python?

  • I'm not just looking for library documentation and some sample code for creating threads. I'd like to gain a clear understanding of what's involved in writing concurrent code in Python and performance considerations. I'd have a good understanding of how to deal with concurrent circumstances, including but not limited to : multiple workers, how Python is typically used to deal with asynchronous data streams, what happens when a thread is created to handle a blocking task like IO or networking and how to get good performance out of it, etc. Is there any comprehensive resource for these kind of questions, or does it mostly need to be pulled from a myriad of blog posts?

  • Answer:

    I would start by reading this: http://learn-gevent-socketio.readthedocs.org/en/latest/general_concepts.html And then this (about Python3 co-routins) http://www.dabeaz.com/coroutines/

Eran Kampf at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.