Support multi-threading