The RCU(read-copy-update) offers some really good insights into writing good pub-sub systems, garbage collectors, locked writers with almost naked readers and so on.
Can we have a discussion on this some time in the fosscafe meetups ?
https://elixir.free-electrons.com/linux/latest/source/Documentation/RCU/RTFP.txt
is a good start with some background.
Regards,
Giri