| 1 | --- ../libqalculate-1.0.0/libqalculate/util.cc 2017-07-16 12:48:15.000000000 +0200 |
| 2 | +++ ./libqalculate/util.cc 2017-08-08 23:15:29.000000000 +0200 |
| 3 | @@ -937,8 +937,8 @@ |
| 4 | } |
| 5 | |
| 6 | void Thread::enableAsynchronousCancel() { |
| 7 | - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); |
| 8 | - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
| 9 | + //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); |
| 10 | + //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); |
| 11 | } |
| 12 | |
| 13 | void *Thread::doRun(void *data) { |
| 14 | @@ -960,7 +960,7 @@ |
| 15 | } |
| 16 | |
| 17 | bool Thread::cancel() { |
| 18 | - int ret = pthread_cancel(m_thread); |
| 19 | + int ret = pthread_kill(m_thread, 0); |
| 20 | running = (ret != 0); |
| 21 | return !running; |
| 22 | } |