Boost logo

Boost Users :

Subject: Re: [Boost-users] multithreaded timer?
From: boost_newbie (frares_at_[hidden])
Date: 2009-03-26 10:58:21

As far as I could understand, the deadline_timer just runs once, i.e.,
if I would like to use it multiple times, I have to instantiate new
ones everytime.

It needs to be turned on inside a separate thread, the command queue
one, when it sends a serial command, and if the answer arives before
the timer is due, it has to be turned off, again inside that separate
queue thread, so it doesn't hit the "resend".

So far I did manage to put it to work, but after a few serial
commands, some successfull and some timed-out, the timer associated
"service" crashes.

I don't know if I should use a "mutex", neither where to put it. I
found the documentation a bit frustrating.

Thanks again

On 26 mar, 10:33, Igor R <[hidden]> wrote:
> > The ASIO timer is quite strange to me, I didn't manage to make it work. I have already seen the "timers" tutorials at boost web pages, and none have worked for me as expected.
> > Any ideas / suggestions / snippets?
> asio::deadline_timer usage is trivial, what problem did you encounter?
> _______________________________________________
> Boost-users mailing list
> Boost-us..._at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at