You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
719 B

--- ../libqalculate-2.0.0/libqalculate/util.cc 2017-08-27 20:37:20.000000000 +0200
+++ ./libqalculate/util.cc 2017-08-30 21:33:31.235484528 +0200
@@ -771,8 +771,8 @@
}
void Thread::enableAsynchronousCancel() {
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
}
void *Thread::doRun(void *data) {
@@ -795,7 +795,8 @@
bool Thread::cancel() {
if(!running) return true;
- running = pthread_cancel(m_thread) != 0;
+ //running = pthread_cancel(m_thread) != 0;
+ running = pthread_kill(m_thread, 0) != 0;
return !running;
}