I have some code that registers signals, basically starting it's own thread.
This needs to be in the main thread, since signals only work there. Once every, maybe, 30 executions in my CI an assert triggers, that my code (and thereby the test) was not executed on the main thread.
Is there a way to reliably make that happen? How come this is so rare? Could the CI and maybe hyperthreading have something to do with it?