Replace pthread_exit(NULL) calls by return NULL
This MR solves a segfault problem with pthread. See the linked issue for details. It follows the accepted answer in https://stackoverflow.com/a/27235846
Closes #121 (closed)
This seems to solve the issues when tested with clang libc++ (where the error actually showed up)
Edited by Simon Praetorius