This works around the occasional thread::start() : pthread_setaffinity_np() failed exception that's been plaguing the Quantum Inspire team. The exception most likely occurs because m_cpu is only initialized when set_cpu() is first called and thus might contain garbage for some code paths, or perhaps because set_cpu() is called with garbage. I just tore out the entire processor affinity call; it really shouldn't functionally matter what processor a thread runs on, and in terms of performance I doubt this would actually have helped, considering the state of the codebase.
This works around the occasional
thread::start() : pthread_setaffinity_np() failed
exception that's been plaguing the Quantum Inspire team. The exception most likely occurs becausem_cpu
is only initialized whenset_cpu()
is first called and thus might contain garbage for some code paths, or perhaps becauseset_cpu()
is called with garbage. I just tore out the entire processor affinity call; it really shouldn't functionally matter what processor a thread runs on, and in terms of performance I doubt this would actually have helped, considering the state of the codebase.