Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def create_scheduler(*, close_timeout=0.1, limit=100,
pending_limit=10000, exception_handler=None):
if exception_handler is not None and not callable(exception_handler):
raise TypeError('A callable object or None is expected, '
'got {!r}'.format(exception_handler))
loop = asyncio.get_event_loop()
return Scheduler(loop=loop, close_timeout=close_timeout,
limit=limit, pending_limit=pending_limit,
exception_handler=exception_handler)