proper thread protection, excludes BSD from repos, still Thread.join() needs checking