# HG changeset patch # User James Bergstra # Date 1284915976 14400 # Node ID e9bb3340a8702fdd5dfd089f7092f491d08d5ffe # Parent d3ee0d2d03e67fcdbace10938e00f746c683d935 plugin_greenlet draft0 diff -r d3ee0d2d03e6 -r e9bb3340a870 doc/v2_planning/plugin_greenlet.py --- a/doc/v2_planning/plugin_greenlet.py Sun Sep 19 13:05:48 2010 -0400 +++ b/doc/v2_planning/plugin_greenlet.py Sun Sep 19 13:06:16 2010 -0400 @@ -38,7 +38,7 @@ while True: if gr == 'return': return a, kw - print 'vm_loop gr=',gr,'args=',a, 'kwargs=', kw + #print 'vm_loop gr=',gr,'args=',a, 'kwargs=', kw gr, dest, a, kw = gr.switch(vm, gr, dest, a, kw) #print 'gmain incoming', incoming vm = greenlet(vm_loop) @@ -54,7 +54,7 @@ while True: for i in xrange(N): for glet in glets: - print 'repeat_task_i dest=%(dest)s args=%(args)s, kw=%(kwargs)s'%locals() + #print 'repeat_task_i dest=%(dest)s args=%(args)s, kw=%(kwargs)s'%locals() # jump to task `glet` # with instructions to report results back to this loop `g` _vm, _gself, _dest, args, kwargs = vm.switch(glet, gself, args, kwargs) @@ -78,7 +78,7 @@ """ def service_loop(vm, gself, dest, args, kwargs): while True: - print 'service calling', fn.__name__, args, kwargs + #print 'service calling', fn.__name__, args, kwargs t = fn(vm, gself, *args, **kwargs) #TODO consider a protocol for returning args, kwargs if t is None: