[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with Timers on Solaris
From: |
Anand Narwani |
Subject: |
Re: Help with Timers on Solaris |
Date: |
Mon, 28 Oct 2002 06:27:42 -0800 (PST) |
Hi David,
Thanks for the info... I finally decided to implement
it using an Event object, but I'm still having lots of
trouble with that (please see my other posing Re:
Solaris 8 and pthread issues. ).
thanks again,
Anand
--- David Sugar <address@hidden> wrote:
>
> The behavior of signals in threaded applications is
> different between
> Linux and Solaris. The onTimer handler and other
> signal related handlers
> are non-portable and are meant only to be used on
> platforms that have
> useful properties. You might want to use a
> conditional object or
> something similar to sleep for a specified period of
> time or until woken,
> or to create a seperate timer management thread.
>
>
> On Sun, 20 Oct 2002, Anand Narwani wrote:
>
> > Hello folks,
> > I am attmepting to do something that seems to be
> > reasonably simple but I cannot seem to make it
> work.
> > Here is my configuration:
> > - Solaris 2.8
> > - Common C++2 1.03
> > - g++ 2.95.2
> >
> > Essentially I am attempting to implement a Posix
> > Thread which goes to sleep for a specified period,
> > gets woken up, does some work and then goes back
> to
> > sleep. Please take a look at the source at:
> >
> >
> http://www.employees.org/~anarwani/thread-test.html
> >
> > I have 2 problems:
> > 1. My derived onTimer() routine never gets called
> when
> > the timer expires.
> > 2. I am unable to use the delete operator to
> force my
> > main thread to join with my thread. it simply
> exits
> > the program. I have since worked around the
> problem
> > using a semaphore.
> >
> > I have tested this program on Linux and it works
> > correctly. I suspect that the pthreads
> implementation
> > differences between the two operating systems are
> the
> > reason for the failure on Solaris, but I have no
> idea
> > how to fix this. Any assistance is very much
> > appreciated.
> >
> > Regards,
> > Anand
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Y! Web Hosting - Let the expert host your web site
> > http://webhosting.yahoo.com/
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
> >
>
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/