some basic pthreading with jni