bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Interrupt


From: Julie Russell
Subject: RE: Interrupt
Date: Mon, 22 Dec 2003 13:04:01 +1100

Hi David,

Thanks for your reply. I have now tried to implement a Conditional, however
I can't find an example of this anywhere. I tried doing this:

mutex->enterMutex();
conditional->wait(20000); (timeout in 20 secs)
mutex->leaveMutex();

however it doesn't appear to wait 20 seconds... Can you post a basic example
of how this conditional is implemented. That would help a lot. I passed the
conditional from the class that calls the signal, saw an example of a wait
that did that.

Regards,
Julie.

> -----Original Message-----
> From: David Sugar [mailto:address@hidden
> Sent: Saturday, 20 December 2003 10:39 PM
> To: Julie Russell; address@hidden Org
> Subject: Re: Interrupt
>
>
> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> One way to do this is to sleep the thread on a "conditional", and
> then use a
> signal to "wake" it early.  This of course only works on pthread/posix
> systems.  The nearest equiv. in w32 is to use a timed semaphore wait, but
> that is not supported in pthreads :).  I suppose we could construct an
> alrernate sleep object that uses one or the other method based on
> the target,
> like was done for the Buffer class....
>
> On Friday 19 December 2003 01:40 am, Julie Russell wrote:
> > Hi there,
> >
> > I want to interrupt a thread from it's sleeping process, yet I
> can't seem
> > to see an interrupt method in the documentation. Is there one,
> and if I use
> > it, does it stop sleeping and resume the next line of execution, or how
> > does it work?
> >
> > Thanks in advance,
> > Julie.
> >
> >
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
>
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]