MCPcopy Create free account
hub / github.com/Tencent/mars / CancelAndWait

Method CancelAndWait

mars/comm/messagequeue/message_queue.cc:935–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

933}
934
935void MessageQueueCreater::CancelAndWait() {
936 ScopedLock lock(messagequeue_mutex_);
937
938 if (KInvalidQueueID == messagequeue_id_) return;
939
940 BreakMessageQueueRunloop(messagequeue_id_);
941 messagequeue_id_ = KInvalidQueueID;
942 lock.unlock();
943 if(ThreadUtil::currentthreadid() != thread_.tid()) {
944 thread_.join();
945 }
946}
947
948MessageQueue_t MessageQueueCreater::CreateNewMessageQueue(boost::shared_ptr<RunloopCond> _breaker, thread_tid _tid) {
949 return(__CreateMessageQueueInfo(_breaker, _tid));

Callers 1

~AlarmMethod · 0.45

Calls 5

BreakMessageQueueRunloopFunction · 0.85
WaitForRunningLockEndFunction · 0.85
unlockMethod · 0.45
tidMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected