MCPcopy Create free account
hub / github.com/acl-dev/acl / stop_channels

Method stop_channels

lib_acl_cpp/src/redis/redis_client_pipeline.cpp:805–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805void redis_client_pipeline::stop_channels() const
806{
807 const token_node* iter = channels_->first_node();
808 std::vector<redis_pipeline_channel*> channels;
809 while (iter) {
810 redis_pipeline_channel* channel =
811 static_cast<redis_pipeline_channel*>(iter->get_ctx());
812 // Notify and wait for the channel thread to exit
813 channel->stop_thread();
814 channels.push_back(channel);
815 iter = channels_->next_node();
816 }
817
818 // Delete all channels threads
819 for (std::vector<redis_pipeline_channel*>::iterator
820 it = channels.begin(); it != channels.end(); ++it) {
821 channels_->remove((*it)->get_addr());
822 delete *it;
823 }
824
825 logger("All channels in pipeline have been stopped!");
826}
827
828void redis_client_pipeline::start_channels()
829{

Callers

nothing calls this directly

Calls 9

stop_threadMethod · 0.80
beginMethod · 0.80
first_nodeMethod · 0.45
get_ctxMethod · 0.45
push_backMethod · 0.45
next_nodeMethod · 0.45
endMethod · 0.45
removeMethod · 0.45
get_addrMethod · 0.45

Tested by

no test coverage detected