Skip to content

Commit

Permalink
Use IPCLoggingPatch and KeyboardInterruptHandlerPatch as default for …
Browse files Browse the repository at this point in the history
…background task
  • Loading branch information
romanroibu committed Nov 18, 2019
1 parent b231807 commit 1b66c14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pupil_src/shared_modules/tasklib/background/create.py
Expand Up @@ -13,6 +13,7 @@

from tasklib.background.task import BackgroundGeneratorFunction
from tasklib.background.task import BackgroundRoutine
from tasklib.background.patches import IPCLoggingPatch, KeyboardInterruptHandlerPatch


def create(
Expand All @@ -39,7 +40,10 @@ def create(
if kwargs is None:
kwargs = {}
if patches is None:
patches = []
patches = [
IPCLoggingPatch(),
KeyboardInterruptHandlerPatch(),
]

if inspect.isgeneratorfunction(routine_or_generator_function):
return BackgroundGeneratorFunction(
Expand Down

0 comments on commit 1b66c14

Please sign in to comment.