Skip to content

Tag: multithreading

pthread_cancel and cancellation point

I’m learning the pthread_cancel function and testing whether thread would be cancelled when it doesn’t reach cancellation point. Thread is created by default attribute and make it running in add loop. But when cancellation request was sent and thread exit immediately. It doesn’t reach cancel…

Is iptables thread safe?

This seems to me to be a basic question, but google and SO fail to give me an answer. As the title says, is iptables thread safe? If I have multiple processes making calls to iptables, should I create a lock for myself? There seems to be some threads from 2009 querying if netfilter is thread-safe, with no sol…

Kill python thread using os

I’ve already asked similar question many times, but still can’t find appropriate solution. I have and external function, that could run in some cases very long. I want to interrupt it after, say, 30 seconds. How do I do that? Threads are good, but I can’t stope them (i don’t have acces…