Condvar: Make linked_item type unnecessary
The lock-free queue, queue_mpsc, used to assume that the record stored in the queue has a type linked_item<T>. The template doesn't *really* need to assume this type - all it really needs is that the queued record has inside it a "next" pointer. In this patch, we allow queue_mpsc to take any type LT which has a field "LT *next". linked_item<T> is left just as an example implementation of LT, but more importantly, the "struct wait_record" defined in the previous patch can also be used in queue_mpsc because it has a "next" pointer.
Showing
Loading
Please register or sign in to comment