🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11: Microsoft entfernt WMIC-Tool gegen Ransomware - ad-hoc-news.de(14.09.2026 um 07:58 Uhr)
🕵️ SicherheitslückenMicrosoft schließt Rekordzahl an Sicherheitslücken - techbook(14.09.2026 um 09:00 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🕵️ SicherheitslückenBurn Out, Or Fade Away(14.09.2026 um 14:25 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11: Microsoft entfernt WMIC-Tool gegen Ransomware - ad-hoc-news.de(14.09.2026 um 07:58 Uhr)
🕵️ SicherheitslückenMicrosoft schließt Rekordzahl an Sicherheitslücken - techbook(14.09.2026 um 09:00 Uhr)

🔧 Programmierung 🕛 vor 6 Monaten 2 Min Lesezeit
0

Rarely Unique Shared Mutexes

↗ Quelle (dev.to)
🗣️ Stimme:

An ru_shared_mutex may provide better performance than an instance of std::shared_mutex. The performance advantage is proportional to the following:




  • The ratio of shared locks to unique locks.

  • The number of CPU processor cores.

  • The threads that take the lock are static versus dynamic.



A big drawback is that each rarely unique shared mutex must be the singleton of a distinct class, specifically, an instantiation of the ru_shared_mutex::c class template. Each instantiation has the same interface as std::shared_mutex for shared and exclusive locking.



Waiting unique locks always take priority over waiting shared locks. Multiple threads waiting for a unique lock maynot get the lock in the order that they called 'lock()'.



Requires C++17 or later.



https://github.com/wkaras/C-plus-plus-intrusive-container-templates



ru_shared_mutex.h is the header, ru_shared_mutex.cpp is the implementation file. Logic and speed tests are in test_ru_shared_mutex*.cpp.



I ran one of the tests (test_ru_shared_mutex_speed2.cpp), on an x86 desktop with 4 physical / 8 logical CPU cores. The test simulates an data structure accessed from multiple threads that never blocks on reads by having two redundant copies, each with its own shared mutex. When there was one write per 999 reads, the number of reads using ru_shared_mutex was more than 17 times the number of reads using std::shared_mutex. When there as one write per 19,999 reads, the number reads using ru_shared_mutex was more than 32 time the number of reads using std::shared_mutex.



If anyone has easy access to a server with hundreds of CPU cores, it would be great if you could run test_ru_shared_mutex_speed2.cpp (with -DNDEBUG and at least -O2), and post the output.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
The Gemini desktop app is now available for Windows
1 Quelle
Burn Out, Or Fade Away
1 Quelle
Windows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Rarely Unique Shared Mutexes

Thematisch verwandte Begriffe: Rarely, Unique, Shared, Mutexes · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...