On Sat, Mar 21, 2009 at 12:24 AM, Daniel Baluta <[email protected]>wrote:

> On Fri, Mar 20, 2009 at 8:30 PM, Shyam Burkule <[email protected]>
> wrote:
> > Hello All,
> >
> >           Is it possible to take semaphore in one thread and release it
> in
> > another thread?
> >
> > Thanks
> > Shyam
> >
>
> Hello ,
>
> Of course it is possible as long as you have a reference to the semaphore.
>
> But be aware that the usage of semaphores is advisory , and it depends
> on you to implement a good functionality.
>
> thanks,
> Daniel.
>


Hi Daniel,
Thanks for reaply..

        Actually I was reading about synchronization mechanism in Linux ans
Windows. So same case is applicable to mutex as well. I mean it possible to
take mutex one thread and release it in another thread. But in Windows there
is mutex ownership concept, meaning thread which takes mutex has to release
it. So if some thread release mutex, which is held by another thread then
there wont be mutual exclusive access to shared data  protected by mutex in
that thread.


Sorry for silly question :).


Thanks
Shyam



Thanks
    Shyam

Reply via email to