making with-threading-context more configurable