def _submit(self, fn, *args, **kwargs): fut = self._future_cls() self._run_work_func(_utils.WorkItem(fut, fn, args, kwargs)) return fut
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
def _submit(self, fn, *args, **kwargs): f = Future() self._maybe_spin_up() self._work_queue.put(_utils.WorkItem(f, fn, args, kwargs)) return f