mattn / mruby-thread

48 stars 31 forks source link

What pthread_kill is doing? #30

Closed murasesyuka closed 9 years ago

murasesyuka commented 9 years ago

there is one question.

what mean under the code?

pthread_kill(context->thread, 0);

if checking thread_id valid or thread exist, I think it need return value. for example

if (pthread_kill(context->thread, 0) == ESRCH){ /*  Not a valid thread  */ }
mattn commented 9 years ago

do you mean pthread_kill in mrb_thread_kill ?

murasesyuka commented 9 years ago

Both in mrb_thread_kill () and in mrb_thread_context_free ().

mattn commented 9 years ago

This is complementary call for terminating thread.

murasesyuka commented 9 years ago

thank you for fix