Boost logo

Boost :

From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2007-08-07 23:11:42


On Aug 7, 2007, at 7:49 PM, Rene Rivera wrote:

> Ion Gaztañaga wrote:
>> Ummm. What do you suggests, temporary names created on the fly (using
>> the system clock, perhaps)? serialization library uses temporary
>> files
>> but that's not enough, since I have to create unique resource names.
>
> If you have access to it, or can figure out how to get it, using the
> process ID is the safest.

hostid will get you the processor id, but I'm not sure that will
solve the problem. If you have a system with one processor and start
two IPC jobs, the first job will create the resource, the second job
will use the resource created by the first job, and the first job to
terminate will remove it, leaving the other one in limbo.

-- Noel


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