Re: POSIX thread question




Jack wrote:

Only the 10 threads' parent process can execute the above line and
destroy the cntr_mutex. The 10 threads can not destroy the cntr_mutex
since they do not execute main() function, right?

In general, a "do not" statement can't justify a "can not" statement.
It would be an error say I "can not" eat a pickle because I "do not"
have any pickles. I can go upstairs to my kitchen and get a pickle.

You are correct that your threads do not execute main and hence do not
destroy the mutex. But they could, if they were coded to do so
(intentionally or by accident).

DS

.



Relevant Pages

  • Re: bindevent() requires source event code ?
    ... gerry wrote: ... > however if the form.Destroymethod is empty the delegate is never called ... Destroy() method. ... method it won't execute if there isn't any code to execute in the ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Removing Objects from Memory VFP 9.0
    ... CREATEOBJECTas my error processor. ... I Execute This.oErrorObject.Destroy where the ON ERROR is reset ... The ErrorClass remains in memory. ... calling the object's Destroy method. ...
    (microsoft.public.fox.vfp.forms)
  • Re: properly destroying a widget
    ... The message details are below. ... Note that the widget named ... After you destroy it, the other ... > bindtags attempt to execute, ...
    (comp.lang.tcl)
  • Re: Thread Suspend/Resume
    ... >terminated until i want the code to execute again? ... >Would another option be to destroy and re-create the thread object when ...
    (alt.comp.lang.borland-delphi)
  • Re: destroy . stumper
    ... After yours has been executed (destroy .), ... doesn't exist anymore. ... Esc and Ctrl-x have no additional bindings, ...
    (comp.lang.tcl)