MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / async_wrapper

Function async_wrapper

execution.py:290–292  ·  view source on GitHub ↗
(f, prompt_id, unique_id, list_index, args)

Source from the content-addressed store, hash-verified

288 f = getattr(obj, func)
289 if inspect.iscoroutinefunction(f):
290 async def async_wrapper(f, prompt_id, unique_id, list_index, args):
291 with CurrentNodeContext(prompt_id, unique_id, list_index):
292 return await f(**args)
293 task = asyncio.create_task(async_wrapper(f, prompt_id, unique_id, index, args=inputs))
294 # Give the task a chance to execute without yielding
295 await asyncio.sleep(0)

Callers 1

process_inputsFunction · 0.85

Calls 1

CurrentNodeContextClass · 0.90

Tested by

no test coverage detected