Hi Paul, like I've mentioned in my earlier mails, I might be abusing mutexes, so please enlighten me if the following pseudocode example is nutty:
global mutex _mymutex thread 1 (main app calling shared lib funcs): --- lock _mymutex call init function in dll lock _mymutex --- thread 2 (created inside shared lib when init called) do lots of init stuff, like creating a gl context and creating a app wxwidgets main loop unlock _mymutex --- The second lock in thread 1 effectively waits for the created thread to complete initialisation and blocks the main app from calling other functions that depend on the initialisation. regards jp Paul Speed wrote: > > > J.P. Delport wrote: >> I have code that depends on the non-recursive behaviour, > > This is more of a curiosity thing and since I'm used to recursive locks > it may be a limitation in my thought patterns. > > How are you depending on this behavior? Or the real question, if > grabbing the non-recursive mutex from the same thread how will it ever > get cleared? Depending on the answer to that question, how is that not > a bug in the calling code (since presumably it can never clear). > > Again though, I think about threading in a specific way since all of my > uses for a mutex (synchronizing resources or interprocess coordination) > would not be affected by double acquisition. So I'm just curious about > others' experiences. > > -Paul > _______________________________________________ > osg-users mailing list > osg-users@openscenegraph.net > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/