i did this once before. i'm still looking for that old code among 10000+ files. but i'm worried that code has some "clever" solution based on specific things it would wait for, probably done using lots of C-like syscalls. what i would like to know is a Pythonic way to wait for 2 or more things, to wake up when any one of them happens. i will not give specific examples to avoid replies based on those specific examples. i'm looking for general solutions to handle any case in Python.
My guess is you're wanting to do something like the equivalent of a select() for when some file descriptors have data, or you're using some sort of multithreaded/multiprocessing/async framework. I don't think there's any generic "wait for something".
your guess is on target.
i was thinking along the lines of some code that can wait for one of a list of 2 or more threads to quit. this function is passed a list of functions, each waits on the various things to wait on. the function launches a thread for each and waits for any one to quit. then it returns the index of which it was. the other threads probably should be killed.