(
self, fn: Callable[..., Any], /, *args: Any, **kwargs: Any
)
| 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 |
no outgoing calls
no test coverage detected