Live data from Hacker News

Offset: Goroutines ported to Python

docs.google.com

11–14 of 14 posts

Re: Offset: Goroutines ported to Python

#11
Stackless Python support Go style concurrency with tasklets( goroutines in go) and channels for scheduling and data passing between them.

Pypy now has stackless support, which makes it the obvious candidate for doing CSP style concurrency with python.

It will not however, scale that concurrency to execute in parallel in multiple cores, since it is still bound by the GIL.

If you want to stay with CPython, you could look at Gevent.

Re: Offset: Goroutines ported to Python

#13

Stackless Python support Go style concurrency with tasklets( goroutines in go) and channels for scheduling and data passing between them. Pypy now has stackless support, which makes it the obvious candidate for doing CSP style concurrency with python. It will not however, scale that concurrency to execute in parallel in multiple cores, since it is still bound by the GIL. If you want to stay with CPython, you could lo…

gevent is based on an eventloop to do the scheduling, it's quite different than the scheduling done in offset and offset will soon support the possibility to launch your goroutin on different OS processes for //. More over gevent monkey-patch the standard library which make sometimes the integration with your code difficult, offset however use its own syscall module.

Also the implementation of channels or stackless in pypy is a little different than the one you can find in offset (or go for that matter). offset channels support buffering, and you can also select them. offset like the implementation of stackless in pypy is using the continulets to do the job when you are using in pypy and python-fibers on cpython which bind the stacklet lib from pypy as well.

Post reply on HN