raii_thread lib final fixes