threading Connection class