qcodes/utils/threading.py
def thread_map(
        callables: Sequence[Callable[..., T]],
        args: Optional[Sequence[Sequence[Any]]] = None,
        kwargs: Optional[Sequence[Dict[str, Any]]] = None
) -> List[Optional[T]]:
    """
    Evaluate a sequence of callables in separate threads, returning
    a list of their return values.

    Args:
        callables: A sequence of callables.
        args (Optional): A sequence of sequences containing the positional
            arguments for each callable.
        kwargs (Optional): A sequence of dicts containing the keyword arguments
            for each callable.

    """
    if args is None:
        args = ((),) * len(callables)
    if kwargs is None:
        empty_dict: Dict[str, Any] = {}
        kwargs = (empty_dict,) * len(callables)
    threads = [RespondingThread(target=c, args=a, kwargs=k)
               for c, a, k in zip(callables, args, kwargs)]

    for t in threads:
        t.start()

    return [t.output() for t in threads]

    Evaluate a sequence of callables in separate threads, returning
    a list of their return values.

    Args:
        callables: A sequence of callables.
        args (Optional): A sequence of sequences containing the positional
            arguments for each callable.
        kwargs (Optional): A sequence of dicts containing the keyword arguments
            for each callable.

    
Evaluate a sequence of callables in separate threads, returning
a list of their return values.
Evaluate a sequence of callables in separate threads returning a list of their return values .
def thread_map(
        callables: Sequence[Callable[..., T]],
        args: Optional[Sequence[Sequence[Any]]] = None,
        kwargs: Optional[Sequence[Dict[str, Any]]] = None
) -> List[Optional[T]]:
    if args is None:
        args = ((),) * len(callables)
    if kwargs is None:
        empty_dict: Dict[str, Any] = {}
        kwargs = (empty_dict,) * len(callables)
    threads = [RespondingThread(target=c, args=a, kwargs=k)
               for c, a, k in zip(callables, args, kwargs)]
    for t in threads:
        t.start()
    return [t.output() for t in threads]
def thread_map ( callables : Sequence [ Callable [ ... , T ] ] , args : Optional [ Sequence [ Sequence [ Any ] ] ] = None , kwargs : Optional [ Sequence [ Dict [ str , Any ] ] ] = None ) -> List [ Optional [ T ] ] : if args is None : args = ( ( ) , ) * len ( callables ) if kwargs is None : empty_dict : Dict [ str , Any ] = { } kwargs = ( empty_dict , ) * len ( callables ) threads = [ RespondingThread ( target = c , args = a , kwargs = k ) for c , a , k in zip ( callables , args , kwargs ) ] for t in threads : t . start ( ) return [ t . output ( ) for t in threads ]
Evaluate a sequence of callables in separate threads, returning
a list of their return values.
Evaluate a sequence of callables in separate threads returning a list of their return values .
"""
    Evaluate a sequence of callables in separate threads, returning
    a list of their return values.

    Args:
        callables: A sequence of callables.
        args (Optional): A sequence of sequences containing the positional
            arguments for each callable.
        kwargs (Optional): A sequence of dicts containing the keyword arguments
            for each callable.

    """
callables
Sequence[Callable[..., T]]
A sequence of callables.
A sequence of callables .
args
Optional[Sequence[Sequence[Any]]]
A sequence of sequences containing the positional
arguments for each callable.
A sequence of sequences containing the positional arguments for each callable .
kwargs
Optional[Sequence[Dict[str, Any]]]
A sequence of dicts containing the keyword arguments
for each callable.
A sequence of dicts containing the keyword arguments for each callable .