Okay, so one time out of ten thousand will be a write to the structure.
Is it important that:
A) if at time t, a thread determines that slot n should be modified,
must all reads from t on find the new, modified value, or would it
be okay for other threads to use the old value for some window of
time?
B) the write be "as quick" as a read, or can a write be a lengthy process?
What I wondering is if you couldn't create a structure (in C if need be),
that uses NO locking at all, and is only valid for read only access. It's
then up to any writers to cooperate with each other, and what a writer does
is take out a lock on different table, then completely copy all 50,000
entries to a new table, modify the entry it needs to, and swap the new
table for the old, and then release the lock.
Modifying the table becomes lengthy, you need to verify on your platform
that you can swap a pointer in an atomic operation, readers can get old
values for some period of time, but readers never have to lock the table.
Jerry
========================================================
Jerry Asher [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161 Tel: (510) 549-2980
Berkeley, CA 94709 Fax: (877) 311-8688