a teeny library / design pattern for managing connections in a process and thread safe fashion