api_generator:c++:support separate thread call