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: Keyboard is not visible when typing a string in a text field By akvenk - on June 22, 2018
Disable "Connect Hardware Keyboard' option in your iOS simulator and try running your scripts. Steps in this video: https://www.youtube.com/watch?v=jA0aT24kL-8
RE: Best and easiest way to customize a GUI in Matlab? By Melvinchunter - on June 20, 2018
GUIs give point-and-click control of programming applications, disposing of the need to take in a language or sort commands keeping...