mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
call pthread_kill unconditionally in Thread::interrupt() to ensure system calls such as epoll_wait are interrupted
This commit is contained in:
parent
3787985b25
commit
cc3289d88a
@ -124,10 +124,8 @@ class MySystem: public System {
|
|||||||
|
|
||||||
r->setInterrupted(true);
|
r->setInterrupted(true);
|
||||||
|
|
||||||
if (flags & Waiting) {
|
|
||||||
pthread_kill(thread, InterruptSignal);
|
pthread_kill(thread, InterruptSignal);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
virtual void join() {
|
virtual void join() {
|
||||||
int rv UNUSED = pthread_join(thread, 0);
|
int rv UNUSED = pthread_join(thread, 0);
|
||||||
@ -849,6 +847,7 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
} else {
|
} else {
|
||||||
switch (signal) {
|
switch (signal) {
|
||||||
case VisitSignal:
|
case VisitSignal:
|
||||||
|
case InterruptSignal:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user