Open GoogleCodeExporter opened 9 years ago
print_things : task things
{
string thing = things.get_string()
while(thing != nil) {
print(thing)
thing = things.get_string()
}
}
entrypoint :
{
task thingPrinter = task(print_things)
string thing = io.read_line()
while(len(thing) > 0)
thingPrinter.send(thing)
}
Original comment by ryoohki@gmail.com
on 15 Feb 2012 at 8:08
I've considered things like stackless python's channels to be a lot nicer than
most other forms of inter-thread communication...
the above would, presumably, wait in a blocking state on get_string(), while
the entrypoint would read in and pass that data (via the task's channel).
Original comment by ryoohki@gmail.com
on 15 Feb 2012 at 8:12
Original issue reported on code.google.com by
don.ap...@gmail.com
on 15 Feb 2012 at 7:59