check pthread_create return code
make thread spawning use `~once fn`