{"version":"1.0","author_name":"yohhoy","provider_name":"Hatena Blog","height":"190","published":"2024-03-04 00:00:00","url":"https://yohhoy.hatenadiary.jp/entry/20240304/p1","categories":["C++","C++2c"],"image_url":null,"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20240304%2Fp1\" title=\"Read-Copy Update @ C++26 - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://yohhoy.hatenadiary.jp/","author_url":"https://blog.hatena.ne.jp/yohhoy/","description":"C++2c(C++26)\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u308b<rcu>\u30d8\u30c3\u30c0\u306b\u3064\u3044\u3066\u3002Read copy update\u306e\u7565\u3002 // C++2c #include <atomic> #include <mutex> // scoped_lock #include <rcu> struct Data : public std::rcu_obj_base<Data> { int m1; /*...*/ }; std::atomic<Data*> data_; // new\u78ba\u4fdd\u3055\u308c\u305f\u521d\u671f\u5024\u304c\u5225\u9014\u8a2d\u5b9a\u3055\u308c\u308b\u524d\u63d0 void multiple_reader() { // Reader\u30ed\u30c3\u30af\u53d6\u5f97\uff08\u30ce\u30f3\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0\u64cd\u4f5c\uff09\u2026","provider_url":"https://hatena.blog","width":"100%","title":"Read-Copy Update @ C++26","blog_title":"yohhoy\u306e\u65e5\u8a18","type":"rich"}