Boost logo

Boost :

Subject: Re: [boost] [filesystem] truncate() function?
From: Jonathan Franklin (franklin.jonathan_at_[hidden])
Date: 2009-10-15 11:18:47


On Thu, Oct 15, 2009 at 9:10 AM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
>> Unfortunately, that is not threadsafe. But I do think it is doable.
>> Just probably beyond Boost.Filesystem. Maybe a separate library.
>
> Spinlock, just make all accesses atomic.

I don't think you'll be able to know which writing thread actually
generated the signal, and hence the exception. Seems like all writers
will end up throwing *after* their write call returns.

Throwing after write returns also seems problematic. If the signal
doesn't kill the app, then does the write continue, generating
additional signals, and for how long? When does write return? This
would be your one chance to check the signal state.

Jon


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk