Skip to main content

Questions tagged [locking]

Locking allows different types of resources to be locked by a transaction.

4 votes
1 answer
185 views

I have a C# class with a number of properties that are read by and set by multiple threads. I use a simple lock when getting and setting them in order to have a full-fence memory barrier, so member ...
Joe's user avatar
  • 140
2 votes
0 answers
182 views

This is my second iteration of implementing try_lock_for/try_lock_until function templates in which I've cherry-picked a bunch ...
Ted Lyngmo's user avatar
5 votes
2 answers
190 views

Inspired by How to implement unique_lock for multiple mutexes? I've implemented a RAII mutex locker with the combined capabilities of std::unique_lock and ...
Ted Lyngmo's user avatar
4 votes
1 answer
422 views

There may be a dozen things that could be improved about this code, but it's just a very quick proof of concept and for the sake of this post I'm specifically wanting to know if someone can verify ...
BVernon's user avatar
  • 225
2 votes
3 answers
158 views

Can someone please review my rwlock implementation to see if there are any issues with correctness (hopefully not), give any feedback on how to write good C code etc, design patterns which could be ...
Tejas Anand's user avatar
1 vote
1 answer
360 views

I've recently written a Vulkan library for creating 2D applications with ease. The catch was I need std::lock_guard for my window resize event to resize resources ...
FatalSleep's user avatar
8 votes
3 answers
2k views

I have written the following class that acts as a simple lock for mutual exclusion: ...
digito_evo's user avatar
2 votes
1 answer
248 views

I recently discovered the atomic wait/notify mechanism in C++20 and wrote this readers-writer lock in the style of Linux kernel Seqlock. Writes have to be inside a lock/unlock, while reads are ...
MDH's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
12