MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / submit

Method submit

tests/conftest.py:454–461  ·  view source on GitHub ↗
(
            self, fn: Callable[..., Any], /, *args: Any, **kwargs: Any
        )

Source from the content-addressed store, hash-verified

452 """Executor that adds delay to operations."""
453
454 def submit(
455 self, fn: Callable[..., Any], /, *args: Any, **kwargs: Any
456 ) -> Future[Any]:
457 def slow_fn(*args: Any, **kwargs: Any) -> Any:
458 time.sleep(0.05) # Add delay to simulate slow operation
459 return fn(*args, **kwargs)
460
461 return super().submit(slow_fn, *args, **kwargs)
462
463 executor = SlowExecutor(max_workers=10)
464 yield executor

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected