all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,28 @@
'input.txt' as src_file
class Queue
new list as items
condition as ready
define item_put
items push ready notify
define item_get
items empty if ready wait
items shift
Queue as lines
Queue as count
thread reader
"file://r:%(src_file)s" open each lines.item_put
NULL lines.item_put count.item_get "reader: %d\n" print
thread writer
0 repeat lines.item_get dup while
"writer: %s" print 1+
drop count.item_put
reader as r
writer as w