|
|
|
|
|
by vitpro2213
751 days ago
|
|
Removing anything in non-blocking structures is problematic, see e.g. the referenced lecture of Professor Scott. You never know how many concurrent threads still "are" on the place you wish to remove. You would have to deal with stuff like hazard pointers, limbo lists and the like. Better to keep the small arrays there. |
|
If queue only allows to copy out data you can increase reader pointer after data were copied to different buffer, therefore nothing can be at the place we are removing