MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / swap

Method swap

concurrentqueue.h:687–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685 }
686
687 void swap(ProducerToken& other) MOODYCAMEL_NOEXCEPT
688 {
689 std::swap(producer, other.producer);
690 if (producer != nullptr) {
691 producer->token = this;
692 }
693 if (other.producer != nullptr) {
694 other.producer->token = &other;
695 }
696 }
697
698 // A token is always valid unless:
699 // 1) Memory allocation failed during construction

Callers 6

ConcurrentQueueClass · 0.45
swapFunction · 0.45
writeMethod · 0.45
full_apiMethod · 0.45
blocking_wrappersMethod · 0.45

Calls 1

swapFunction · 0.70

Tested by 3

writeMethod · 0.36
full_apiMethod · 0.36
blocking_wrappersMethod · 0.36