allow for an arbitrary number of threads in the context switcher