Data structures such as queues, stacks, hashes, and others all need to have thread-safe
versions to be used effectively in the threaded program. The code should provide for the ability
for the sturucture to be used simultaneously in multiple threads. No explicit locking of the
structure should be required to effectively manipulate the structure. Examples of such structures
can be found below.
Data Structures
- Linked List, Queue and Hash Table
- All of these are available in
the book
Programming with Threads. The stuctures are well-documented (in the book),
have well designed interfaces (no explicit locking is required by user), and
are available in source. I have found one bug in the hash where the hash
is not initialized. I use these routines and have made minor enhancements for
my own code. I will make my changes available soon.
|