You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both the TaskPool._apply_spawner and the SimpleTaskPool._start_num methods continue to loop, if an exception is raised during the creation of the target coroutine, but before it is scheduled for execution.
# Probably something wrong with the function arguments.
log.exception(
"%s occurred in group '%s' while trying to "
"create coroutine: %s(*%s, **%s)",
str(e.__class__.__name__),
group_name,
func.__name__,
repr(args),
repr(kwargs),
)
continue# TODO: Consider returning instead of continuing
This is likely only something that can happen, if the function arguments are wrong or the target is not callable at all. In that case continuing to loop seems unnecessary and wasteful. Returning immediately or even re-raising the exception seems more appropriate.
The text was updated successfully, but these errors were encountered:
Both the
TaskPool._apply_spawner
and theSimpleTaskPool._start_num
methods continue to loop, if an exception is raised during the creation of the target coroutine, but before it is scheduled for execution.asyncio-taskpool/src/asyncio_taskpool/pool.py
Lines 788 to 802 in 27eb3bf
This is likely only something that can happen, if the function arguments are wrong or the target is not callable at all. In that case continuing to loop seems unnecessary and wasteful. Returning immediately or even re-raising the exception seems more appropriate.
The text was updated successfully, but these errors were encountered: