示例#1
0
 def _submit(self, fn, *args, **kwargs):
     fut = self._future_cls()
     self._run_work_func(_utils.WorkItem(fut, fn, args, kwargs))
     return fut
示例#2
0
 def _submit(self, fn, *args, **kwargs):
     f = GreenFuture()
     work = _utils.WorkItem(f, fn, args, kwargs)
     if not self._spin_up(work):
         self._delayed_work.put(work)
     return f
示例#3
0
 def _submit(self, fn, *args, **kwargs):
     f = Future()
     self._maybe_spin_up()
     self._work_queue.put(_utils.WorkItem(f, fn, args, kwargs))
     return f