using a threadlocal for the connector