[BangPypers] real use case of gevent context switch gevent.sleep(0)

2015-06-20 Thread anu sree
Hi, I have seen an example of gevent context switch http://sdiehl.github.io/gevent-tutorial/#synchronous-asynchronous-execution Could you please give some real use case with example. It would be fine If you can share link of github project which uses gevent context gevent.sleep(0). Thanks,

Re: [BangPypers] real use case of gevent context switch gevent.sleep(0)

2015-06-20 Thread kracekumar ramaraju
Citation from Taskmaster [1], [2]. [1]: https://github.com/dcramer/taskmaster/blob/79a312c5cb3c34d00829fe9cf4204aeb478a0166/src/taskmaster/client.py#L26 [2]: https://github.com/dcramer/taskmaster/blob/79a312c5cb3c34d00829fe9cf4204aeb478a0166/src/taskmaster/server.py#L199 The reason to put

Re: [BangPypers] real use case of gevent context switch gevent.sleep(0)

2015-06-20 Thread Noufal Ibrahim KV
On Sat, Jun 20 2015, anu sree wrote: Hi, I have seen an example of gevent context switch http://sdiehl.github.io/gevent-tutorial/#synchronous-asynchronous-execution Could you please give some real use case with example. It would be fine If you can share link of github project which uses

Re: [BangPypers] real use case of gevent context switch gevent.sleep(0)

2015-06-20 Thread anu sree
Thanks naufal and Krace. I have tried following code. I have given gevent.sleep(0.1), that means each greenlet let others to execute 0.1 secoond. But here each greenlet waiting for others to complete, why? Is it because of greenlet.joinall ? Here I have created 3 greenlet threads (A, B, C). I

Re: [BangPypers] real use case of gevent context switch gevent.sleep(0)

2015-06-20 Thread kracekumar ramaraju
On Sun, Jun 21, 2015 at 5:55 AM, anu sree anusree@gmail.com wrote: Thanks naufal and Krace. I have tried following code. I have given gevent.sleep(0.1), that means each greenlet let others to execute 0.1 secoond. But here each greenlet waiting for others to complete, why? Is it because