add guard to threads_ resource