Closed szmyd closed 2 months ago
I dunno if this should have a compile/runtime condition around it similar to:
#ifdef USE_PTHREAD_EXIT
pthread_exit(nullptr);
#else
exit(-1)
#endif
to avoid behavior change for those relying on this?
Does it work correctly on Mac? I believe it doesn't work at least on Windows. We should write a helper function that works differently according to compiler flag, as you mentioned.
Does it work correctly on Mac? I believe it doesn't work at least on Windows. We should write a helper function that works differently according to compiler flag, as you mentioned.
It definitely doesn't work on Windows; but should on Mac...Mac has pthread_exit(3)
. I guess the question is, if it's compile time determined what should be the default? exit()
?
Allow the process to handle termination of raft service rather than force process wide
exit()
Addresses #535