Boost logo

Boost :

From: Jim Apple (japple_at_[hidden])
Date: 2003-12-15 10:02:12

John Torjo wrote:
> Also, I think thread-safety of the memorize library is a big issue,
> though I think there are solutions to this.

I've been thinking about this, and I have a two naive ideas:

The basic cycle is (a) look for answer in memo (b) If not found,
calculate answer (c) write answer to memo.

1. Aggressive locking - lock the memo before (a), unlock after (c).
2. Liberal locking - lock the memo for (c) only

My concern is what to do when a thread fails to acquire a lock on the memo.


Boost list run by bdawes at, gregod at, cpdaniel at, john at