摘要 |
Systems and methods for operating software data structures are provided. In one embodiment, lock-free dual queues with conditional synchronization and time-outs are described. The lock-free dual queues of various embodiments of the present invention are accessible by one or more consumer threads and one or more producing threads. The consuming threads are able to access and remove elements from the queue while the producing threads are able to access and add elements to the queue. In some cases, a thread may be both a consuming thread and a producing thread. The add and remove operations of various embodiments of the present invention, generally operate by using conditional synchronization primitives which modifies a value in shared memory to a specified value if the previous value is what was expected.
|