Commit | Line | Data |
---|---|---|
94f1c11e DM |
1 | --- ../../build/qalc/cache/libqalculate-0.9.9/libqalculate/Calculator.cc 2016-07-16 14:49:15.000000000 +0200 |
2 | +++ ./libqalculate/Calculator.cc 2016-08-15 00:21:11.338822562 +0200 | |
3 | @@ -203,8 +203,8 @@ | |
4 | } | |
5 | ||
6 | void *calculate_proc(void *pipe) { | |
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 | FILE *calculate_pipe = (FILE*) pipe; | |
12 | while(true) { | |
13 | bool b_parse = true; | |
14 | @@ -1616,7 +1616,7 @@ | |
15 | if(calculate_thread_stopped) { | |
16 | b_busy = false; | |
17 | } else { | |
18 | - pthread_cancel(calculate_thread); | |
19 | + pthread_kill(calculate_thread, 0); | |
20 | restoreState(); | |
21 | stopped_messages_count.clear(); | |
22 | stopped_warnings_count.clear(); | |
23 | @@ -1640,14 +1640,14 @@ | |
24 | tmp_rpn_mstruct = NULL; | |
25 | b_busy = false; | |
26 | calculate_thread_stopped = true; | |
27 | - pthread_exit(/* Solaris 2.6 needs a cast */ (void*) PTHREAD_CANCELED); | |
28 | + pthread_exit(0); | |
29 | } | |
30 | bool Calculator::busy() { | |
31 | return b_busy; | |
32 | } | |
33 | void Calculator::terminateThreads() { | |
34 | if(!calculate_thread_stopped) { | |
35 | - pthread_cancel(calculate_thread); | |
36 | + pthread_kill(calculate_thread, 0); | |
37 | } | |
38 | } | |
39 |