Is one-insert-multi-read list safe without lock?
I have a problem about synchronization between threads. I know the normal synchronization method and lock-free list. But I have a strange (maybe) idea.
I have a normal singly list, linked by
There is only 1 thread who just insert items into this list, but never delete items. The way to add item:
new_item->next = list_head; list_head = new_item;
There are some other threads who just traverse this list (read only).
There is no lock at all.
I think that this should be safe, because the read-only-threads will never get an invalid pointer. Am I right?
I do not know how to search this on internet. What I get is all about lock-free list by CAS or something. So I ask it here.
Thanks in advance
RE: Extended WPF Toolkit Modify 'available colors' from color picker By Alferats - on July 10, 2017
В текущем варианте свойство с таким именем ищется в объекте DataContext листбокса (и далее вверх по иерархии).Чтобы свойство искалось в...