Well, I started doing some documentation using sphinx the other day but got sidetracked. The current documentation lives in the modules and in the unittests. I guess the only fiddly bit about it currently is to start it up. Currently one has to explicitly get the main loop running. This is because stackless _used_ to only allow stackless.run() on the main tasklet. The latest versions don’t. Once that restriction is removed, having the main loop run implicitly much as the gevent library does (when the Hub singleton is requested) is easy. I need to put that little brick in there, and then everything will run smoothly ☺
K From: [email protected] [mailto:[email protected]] On Behalf Of Aleksandar Radulovic Sent: 23. maí 2014 11:36 To: The Stackless Python Mailing List Subject: Re: [Stackless] goless Speaking of which, when can we see some more documentation or examples on stacklesslib? ;) I was fiddling with it the other day and couldn't find any good enough examples of stacklesslib usage.. Cheers, alex On Tue, May 20, 2014 at 12:13 PM, Kristján Valur Jónsson <[email protected]<mailto:[email protected]>> wrote: You may want to take a look at the latest version of “stacklesslib”, particularly the stacklesslib.wait module. We now have “waitable” channels, so that you can do similar things to select, e.g. c1 = stacklesslib.wait.WaitChannel() c2 = stacklesslib.wait.WaitChannel() … for c in stacklesslib.wait.iwait([c1, c2]): if c is c1: percolate() elif c is c2: promulgate() A “WaitChannel” is ready when its balance is non-zero. There are also “Sendable” and “Receivable” adapters for WaitChannels to in order to wait for either positive or negative balance. The stacklesslib.util.QueueChannel() is a channel with a fifo queue, which can be either unbounded (the default) or have a maximum length. This is, I believe, similar to Go’s channels. K From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Christian Tismer Sent: 18. maí 2014 00:00 To: The Stackless Python Mailing List Subject: Re: [Stackless] goless On 18.04.14 12:46, Kristján Valur Jónsson wrote: Hi, I though’t I’d mention here an experimental problem that a few of my colleagues worked on during PyCon: Goless! http://goless.readthedocs.org/en/latest/index.html It also shows how more complex behavior can be built on top of the relatively simple primitives that stackless provides. (a bit late, but anyway better than never) Yes, quite neat thing. This could be used as an interesting example for the Stackless talk. cheers - Chris p.s.: actually, I'm studying Go a bit, in order to understand how they do stuff, how they lock, how they schedule, ... -- Christian Tismer :^) [email protected]<mailto:[email protected]> Software Consulting : http://www.stackless.com/ Karl-Liebknecht-Str. 121 : http://www.pydica.net/ 14482 Potsdam : GPG key -> 0xFB7BEE0E phone +49 173 24 18 776<tel:%2B49%20173%2024%2018%20776> fax +49 (30) 700143-0023<tel:%2B49%20%2830%29%20700143-0023> _______________________________________________ Stackless mailing list [email protected]<mailto:[email protected]> http://www.stackless.com/mailman/listinfo/stackless -- a lex 13 x http://a13x.net | @a13xnet
_______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
