Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, const ThreadNotificationPtr& threadHook) { if(communicator == 0) { throw PluginInitializationException(__FILE__, __LINE__, "Communicator cannot be null"); } IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); instance->setThreadHook(threadHook); }
Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, function<void()> threadStart, function<void()> threadStop) { if(communicator == nullptr) { throw PluginInitializationException(__FILE__, __LINE__, "Communicator cannot be null"); } IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); instance->setThreadHook(move(threadStart), move(threadStop)); }