Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5950
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: pthread memory leaks |
| Date | 2011-06-01 21:05 +1200 |
| Message-ID | <94mdmsF12lU6@mid.individual.net> (permalink) |
| References | <9430fe32-d385-49a3-b925-daf3cd421789@j13g2000pro.googlegroups.com> <211062bc-81c2-40d2-b6f2-ebd587ff179c@n10g2000vby.googlegroups.com> <slrniubtuo.gtj.grahn+nntp@frailea.sa.invalid> |
On 06/ 1/11 08:27 PM, Jorgen Grahn wrote: > On Tue, 2011-05-31, Adam Skutt wrote: >> On May 30, 7:29 pm, jakash3<jakashth...@gmail.com> wrote: >>> I'm experimenting with signals and conditional variables to implement >>> thread suspension. >> >> Don't. It will only work on Linux, and even then, you'll run into >> many subtle and difficult to debug issues. Threads and signals simply >> do not mix, period. Even if you get your internal signal delivery >> working, you still have to make sure you properly cope with externally >> delivered signals as well, which can be tricky or outright >> impossible. > > A short offtopic question to that: with signals being such an integral > part of Linux, aren't you really saying Linux and threads don't mix? > Or are you taking differences beween Linux and other Unixes into > account here? Maybe you are think of the older Linux Threads (where a thread was process), used before Linux adopted POSIX threads? > I'm asking because I recently read an article where the author > asserted that mixing signals and pthreads [specifically on Linux] is > much simpler than people think. (No, I don't have the URL handy, and > no, I don't trust that author absolutely.) It generally is, just so long as you don't try and use any pthread call in a signal handler! One of the most convenient uses is to dedicate a thread to handling the process' signals. -- Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
pthread memory leaks jakash3 <jakashthree@gmail.com> - 2011-05-30 16:29 -0700
Re: pthread memory leaks Ian Collins <ian-news@hotmail.com> - 2011-05-31 11:50 +1200
Re: pthread memory leaks Ian Collins <ian-news@hotmail.com> - 2011-05-31 11:52 +1200
Re: pthread memory leaks Puppet_Sock <puppet_sock@hotmail.com> - 2011-05-31 06:46 -0700
Re: pthread memory leaks jakash3 <jakashthree@gmail.com> - 2011-05-30 17:00 -0700
Re: pthread memory leaks Ian Collins <ian-news@hotmail.com> - 2011-05-31 12:02 +1200
Re: pthread memory leaks jakash3 <jakashthree@gmail.com> - 2011-05-30 17:05 -0700
Re: pthread memory leaks yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-06-06 09:38 +0000
Re: pthread memory leaks Stuart Redmann <DerTopper@web.de> - 2011-05-31 00:16 -0700
Re: pthread memory leaks "Chris M. Thomasson" <cristom@charter.net> - 2011-06-10 15:46 -0700
Re: pthread memory leaks Adam Skutt <askutt@gmail.com> - 2011-05-31 03:20 -0700
Re: pthread memory leaks Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-01 08:27 +0000
Re: pthread memory leaks Miles Bader <miles@gnu.org> - 2011-06-01 17:39 +0900
Re: pthread memory leaks Ian Collins <ian-news@hotmail.com> - 2011-06-01 21:05 +1200
Re: pthread memory leaks Adam Skutt <askutt@gmail.com> - 2011-06-01 03:27 -0700
Re: pthread memory leaks Adam Skutt <askutt@gmail.com> - 2011-06-01 03:16 -0700
csiph-web