raii_thread lib complete