[Gateway] Thread-safe Adhoc Gateway.