somewhat working in semithread_test