$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [ASIO] Synchronous write on serial_port
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-04-08 13:05:12
Daniele Barzotti ha scritto:
> Daniele Barzotti wrote:
> 
> Ok, I've found the problem.
> ....
> But I've another issue on reading...
> 
> My reading procedure is:
> 
> SerialPort::read_start
>           |
>           |
> SerialPort::read_complete
>           |
>           |
>   (Start an rx timer)
>           |
>           |
> SerialPort::Timer_Expired
>           |
>           |
>    Raise the 'event'
>      DataReveived
> 
> 
> the SerialPort::read_complete is not called.
Ok, it's not called because the io_service thread was terminated!
I've thought that while there was a call to async_read_some the thread
was running...now I've used the io_service::work and everything work.
Thanks.