added an extra argument to ccall to allow calling the c function in a new thread/process, added code to call c function in new thread