pynetdicom.utils.make_target¶
-
pynetdicom.utils.
make_target
(target_fn: Callable) → Callable¶ Wraps target_fn in a thunk that passes all contextvars from the current context. It is assumed that target_fn is the target of a new
threading.Thread
.Requires:
PASS_CONTEXTVARS
setTrue
If the requirements are not met, the original target_fn is returned.
- Parameters
target_fn (Callable) – The function to wrap
- Returns
The wrapped target_fn if requirements are met, else the original target_fn.
- Return type
Callable