File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 12
12
13
13
14
14
def uninterruptible (func : Callable ):
15
- """Decorator to make an async function uninterruptible until it exits."""
15
+ """Decorator to make an async function uninterruptible until it exits.
16
+
17
+ Note that ``rosys.automation.parallelize`` will also be uninterruptible if one of its coroutines is marked with this decorator.
18
+ """
16
19
@functools .wraps (func )
17
20
async def _wrapped (* args , ** kwargs ):
18
21
automation = _CURRENT_AUTOMATION .get ()
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ class parallelize:
8
8
This class allows to combine multiple coroutines into one that can be passed to the
9
9
`automator <https://rosys.io/reference/rosys/automation/#rosys.automation.Automator>`__
10
10
to run them in parallel.
11
+
12
+ Note that ``parallelize`` will be uninterruptible if one of its coroutines is marked with ``@rosys.automation.uninterruptible``.
11
13
"""
12
14
13
15
def __init__ (self , * coros : Coroutine , return_when_first_completed : bool = False ) -> None :
You can’t perform that action at this time.
0 commit comments