Automatically locking old threads