MCPcopy Create free account
hub / github.com/ReadyTalk/avian / interrupt

Method interrupt

src/system/posix.cpp:142–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140 }
141
142 virtual void interrupt()
143 {
144 ACQUIRE(mutex);
145
146 r->setInterrupted(true);
147
148 pthread_kill(thread, InterruptSignal);
149
150 // pthread_kill won't necessarily wake a thread blocked in
151 // pthread_cond_{timed}wait (it does on Linux but not Mac OS),
152 // so we signal the condition as well:
153 int rv UNUSED = pthread_cond_signal(&condition);
154 expect(s, rv == 0);
155 }
156
157 virtual bool getAndClearInterrupted()
158 {

Callers 3

mainMethod · 0.95
runMethod · 0.45
interruptFunction · 0.45

Calls 2

expectFunction · 0.85
setInterruptedMethod · 0.80

Tested by 2

mainMethod · 0.76
runMethod · 0.36