|
|
killing a thread...
Is there any way to kill any pthread ???
I have two threads running and I wanna kill one thread from another
thread.
I donno understand what value to use for 2nd parameter to use
pthread_kill...
|
|
0
|
|
|
|
Reply
|
a.k.vora (41)
|
9/21/2008 6:12:21 AM |
|
Neel wrote:
> Is there any way to kill any pthread ???
> I have two threads running and I wanna kill one thread from another
> thread.
> I donno understand what value to use for 2nd parameter to use
> pthread_kill...
comp.programming.threads is the place to ask.
Nine times out of ten wanting (I assume that's what "wanna" means) to
kill a thread is a design smell.
--
Ian Collins.
|
|
0
|
|
|
|
Reply
|
ian-news (9881)
|
9/21/2008 8:06:38 AM
|
|
Neel wrote:
> Is there any way to kill any pthread ???
> I have two threads running and I wanna kill one thread from another
> thread.
> I donno understand what value to use for 2nd parameter to use
> pthread_kill...
Two options:
a) place the other thread in a separate process.
b) don't kill the other thread but instrument the code to have a "get
out quick" flag.
Other than those there are some pthread specific things but I would
steer away from them.
|
|
0
|
|
|
|
Reply
|
gi4nospam1 (93)
|
9/28/2008 12:29:45 AM
|
|
|
2 Replies
25 Views
(page loaded in 0.053 seconds)
Similiar Articles: What is wrong with pthread_kill on Redhat Linux ??? - comp.unix ...Hi, I have redhat 9.0 Linux installed on my system with gcc 3.2.3. This is the program i used, i compiled it with -lpthread option. Here i am startin... how to kill all the children of a process - comp.unix.programmer ...... such a process-specific resource and the children having a dedicated thread ... Safe script to kill processes - comp.unix.solaris how to kill all the children of a ... Hox to match Linux PID to tomcat thread - comp.lang.java ...So I know the processID of the thread, but how can I match the PID to a Tomcat Thread ... If you kill that process all the threads go away. You may need to look into how OSes ... sigwait() is not catching SIGUSR1 signal - comp.unix.programmer ...When you kill(1) the "process", externally, it may hit the main thread (which is blocked in sigwait() and takes the signal as you expect), while the kill(2) from ... how to kill all child when parent exits - comp.unix.programmer ...> Of course, you then also need e.g. a thread in the parent > that reads from the ... Safe script to kill processes - comp.unix.solaris how to kill all child when parent ... Process synchronization for implementing a global lock - comp.unix ...I did not used mutexes but should be doable, I just preferred to use un-named semaphores because I didn't know what would happen if a thread got killed by a signal. Single Reader, Single Writer FIFO - comp.programming.threads ...But I am not sure if it is really thread-safe. Well, this is not a re-view site, but ... Node* last; // shared Oh boy, you introduced false-sharing, God must be killed a ... How to find the JRE version used by the processes? - comp.unix ...Starting with Java 1.4.0 or so, this information is at the top of the thread dump. Send each process a kill -QUIT . The ones with no version number in the output will be ... system(), PIDs and children - comp.unix.programmerBut when i call it from program2, i'm not able to kill it ... groups.google.com/group/comp.unix.programmer/browse_thread/thread/cdb9f3400e304df3/12f9a6290e4d90cc?q=kill ... Semaphore with timeout - comp.unix.programmerThis thread then interrupts the thread waiting on the semaphore with pthread_kill. Testing for EINTR seems to eliminate the race condition between the timeout and the ... how to kill a thread in windowsComment on how to kill a thread in windows Re: how to kill a thread in windows by Corion (Apostle) on Jun 23, 2006 at 15:18 UTC: I don't think that's possible with ... multithreading - Killing a thread (C#) - Stack OverflowI have created a thread that has a method that's running. But sometimes I will want to kill the thread even if the method is still working. How can I do this? 7/26/2012 10:03:14 PM
|
|
|
|
|
|
|
|
|