3 ms·
Go is a language exactly like that, but I still use lock free algorithms. The reason is even with a private per thread data structure you don't have atomic high
by eloff 10y ago
Go is a language exactly like that, but I still use lock free algorithms. The reason is even with a private per thread data structure you don't have atomic higher level operations like enqueue. So you need to disable interrupts around the data structure methods, both for the OS and the Go runtime. That will cost you more than a lock would, and afaik it's not possible from userspace on Linux (if it is I would love to know how!)