thread safe peer manager