Package gmisclib :: Module threaded_io
[frames] | no frames]

Module threaded_io

source code

This is designed to let you do asynchronous I/O conveniently.

Classes
  CaughtException
  threading_with_result
  Thread_pool
  Thread_poolW
Here, you have a pool of n threads.
  Thread_poolNR
Here, you have a pool of n threads.
  Thread_poolR
Here, you have a pool of n threads.
Functions
threading.Thread
to_be_joined(tlist)
Pick a ripe thread for joining.
source code
 
check_n_raise(x) source code
 
pairmap(fn, inlist, *args, **kwargs) source code
 
testmap() source code
Variables
  __package__ = 'gmisclib'

Imports: sys, threading, die, SL, g_mailbox, Lock


Function Details

to_be_joined(tlist)

source code 

Pick a ripe thread for joining.

Parameters:
  • tlist (list(threading.Thread)) - a list of threads.
Returns: threading.Thread
a thread that is either finished and ready to be joined, or (if none are ready yet) the oldest thread.