|
Boost Users : |
Subject: Re: [Boost-users] asio, new connection handler is not called
From: Eric MALENFANT (Eric.Malenfant_at_[hidden])
Date: 2010-07-07 10:27:46
De: Lloyd
> Now I will explain the real problem. There is a data write (to the
> disk)
> handler routine. If the disk is full I want the thread to wait until
> some
> disk space is free.For this what I do is, in the write handler there
is
> a
> infinite while loop. Inside this thread interruption is enabled. The
it
> checks for free space in the disk. If it is available, it breaks the
> while.
> Other wise it sleeps for some time, continues in the loop. Is there a
> better
> way to handle this?
>
When the handler fails because of a disk full, it could, instead of
entering a loop, schedule a timer and return immediately. When the timer
fires, its handler would retry the write.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net