traveler.core.multithread.multithread_op#

class traveler.core.multithread.multithread_op(op, *, num_workers=4, chunk_size=1000, static_argnames=())[source]#

Bases: object

A class to perform multithreaded operations.

Parameters:
  • op (callable, optional) – The operation to be performed in parallel.

  • num_workers (int, optional) – The number of worker threads to use.

  • chunk_size (int)

  • static_argnames (tuple[str, ...])

Methods#

debug(choosers, *args, **kwargs)

Run the vectorized operation without JIT compilation or chunking.