add support for synchronous threads