Boost logo

Boost :

From: Dietmar Kuehl (dietmar_kuehl_at_[hidden])
Date: 2001-04-17 09:18:55


Hi,
--- Kostya Altukhov <kostya_at_[hidden]> wrote:
> Hello, Diethard,

omitting the name from the greetings avoids spelling problems :-)
... on the other hand it is less personal.

> Just think, we can not use precision of one second for timestamps
> (i.e. time() function), because it is very much possible that several
> events happen in one second and with this approach they will have
> the same timestamp.

You took "timestamp" as too literal: It is not [necessarily] related
to the time at all. A possible "timestamp" is a simple counter which
basically gives an ID to the value: If both values are identical, the
IDs are used to determine which was inserted later. No need for
anything related to a clock! The problem with this approach is that you
might run out of IDs. However, 2^32 elements inserted over the life
time of a single priority queue is pretty much. If it does not suffice,
just use two longs: You are *very* unlikely to run out of 2^64 IDs :-)
Making the timestamp generation and its type a policy avoids wiring
anything restrictive or inefficient into the adapter...

Concerning the other question with respect to a newer version of the
priority queues package: I haven't worked on this stuff since I have
submitted an initial version. Actually, I haven't even pushed it
through a review yet. If anybody is interested in taking this stuff
over or to collaborate on the integration into Boost, I would really
welcome any help with this! If you want me to do something, push me :-)

=====
<mailto:dietmar_kuehl_at_[hidden]>
<http://www.dietmar-kuehl.de/>

__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de


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