MCPcopy Create free account
hub / github.com/apache/brpc / stop

Function stop

src/bthread/parking_lot.h:82–85  ·  view source on GitHub ↗

Wakeup suspended wait() and make them unwaitable ever.

Source from the content-addressed store, hash-verified

80
81 // Wakeup suspended wait() and make them unwaitable ever.
82 void stop() {
83 _pending_signal.fetch_or(1);
84 futex_wake_private(&_pending_signal, 10000);
85 }
86
87private:
88 // higher 31 bits for signalling, LSB for stopping.

Callers

nothing calls this directly

Calls 2

fetch_orMethod · 0.80
futex_wake_privateFunction · 0.70

Tested by

no test coverage detected