Commit dd25454594a5c23202161e09549038dc9275f6f6

Con Kolivas 2012-07-16T22:03:43

Detach pthread from within the api thread in case it is terminated due to not being instantiated before pthread_cancel is called from main, leading to a segfault.