From e3da51cfaacced7424a7e2ea63f1042da96fd1e9 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 6 Dec 2015 14:39:41 +0000 Subject: [PATCH] Add comment [skip ci] --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index f05b3723..773bc6e4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -160,6 +160,8 @@ private: while (true) { int sig; pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, nullptr); + // This thread can be cancelled, but only during this function. + // Such cancel will be the only way to finish this thread. if (sigwait(&signals, &sig) == -1) continue; pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, nullptr); switch (sig) {