diff options
| author | Tom Tromey | 2013-07-11 17:27:28 -0600 |
|---|---|---|
| committer | Tom Tromey | 2013-07-11 17:27:28 -0600 |
| commit | e6f63071a3f7721f55220514b6d9a8ee8c1232d8 (patch) | |
| tree | d91682243035bf07c951e88d8d60f60588c337b6 | |
| parent | 65ddc9fdcdda92707953501fcd0a0e271be9df55 (diff) | |
| download | emacs-e6f63071a3f7721f55220514b6d9a8ee8c1232d8.tar.gz emacs-e6f63071a3f7721f55220514b6d9a8ee8c1232d8.zip | |
Use thread_alive_p in a couple more spots
| -rw-r--r-- | src/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread.c b/src/thread.c index c7ffaced5c1..4c6b6543c84 100644 --- a/src/thread.c +++ b/src/thread.c | |||
| @@ -832,7 +832,7 @@ thread_join_callback (void *arg) | |||
| 832 | XSETTHREAD (thread, tstate); | 832 | XSETTHREAD (thread, tstate); |
| 833 | self->event_object = thread; | 833 | self->event_object = thread; |
| 834 | self->wait_condvar = &tstate->thread_condvar; | 834 | self->wait_condvar = &tstate->thread_condvar; |
| 835 | while (tstate->m_specpdl != NULL && NILP (self->error_symbol)) | 835 | while (thread_alive_p (tstate) && NILP (self->error_symbol)) |
| 836 | sys_cond_wait (self->wait_condvar, &global_lock); | 836 | sys_cond_wait (self->wait_condvar, &global_lock); |
| 837 | 837 | ||
| 838 | self->wait_condvar = NULL; | 838 | self->wait_condvar = NULL; |
| @@ -854,7 +854,7 @@ It is an error for a thread to try to join itself. */) | |||
| 854 | if (tstate == current_thread) | 854 | if (tstate == current_thread) |
| 855 | error ("cannot join current thread"); | 855 | error ("cannot join current thread"); |
| 856 | 856 | ||
| 857 | if (tstate->m_specpdl != NULL) | 857 | if (thread_alive_p (tstate)) |
| 858 | flush_stack_call_func (thread_join_callback, tstate); | 858 | flush_stack_call_func (thread_join_callback, tstate); |
| 859 | 859 | ||
| 860 | return Qnil; | 860 | return Qnil; |