Jump to content

Featured Replies

Posted

I have a thread that is blocked in recvfrom() call, which I want to bring down cleanly.

 

Originally I just closed the socket from main thread and it worked fine on the mac os, but as I moved the program to linux, the recvfrom() continued blocking even after closing the thread, so I moved to using pthread_cancel() (and trying to be really, really careful not to leak anything with it :) ).

 

But it seems to me people in general seem to be against using pthread_cancel() (and on one of the test devices I'm getting SIGABRT signal every time using the pthread_cancel), so I was wondering if there are other, better ways to bring the blocked thread down safely.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...