Mercurial > pylearn
changeset 1196:e9bb3340a870
plugin_greenlet draft0
author | James Bergstra <bergstrj@iro.umontreal.ca> |
---|---|
date | Sun, 19 Sep 2010 13:06:16 -0400 |
parents | d3ee0d2d03e6 |
children | a60b3472c4ba |
files | doc/v2_planning/plugin_greenlet.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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: