rbthreads improvements