MCPcopy Create free account
hub / github.com/apache/arrow / RegisterAtFork

Method RegisterAtFork

cpp/src/arrow/util/atfork_internal.cc:134–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 }
133
134 void RegisterAtFork(std::weak_ptr<AtForkHandler> weak_handler) {
135 std::lock_guard<std::mutex> lock(mutex_);
136 // This is O(n) for each at-fork registration. We assume that n remains
137 // typically low and calls to this function are not performance-critical.
138 MaintainHandlersUnlocked();
139 handlers_.push_back(std::move(weak_handler));
140 }
141
142 std::mutex mutex_;
143 std::vector<std::weak_ptr<AtForkHandler>> handlers_;

Callers 1

RegisterAtForkFunction · 0.80

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected