StephenCleary / AsyncEx

A helper library for async/await.
MIT License
3.51k stars 358 forks source link

AsyncLock lightweight version #193

Open mysteryjeans opened 5 years ago

mysteryjeans commented 5 years ago

Your effort is tremendous and way other my head. I have implemented a simple & lightweight version async lock with reenterance support (tricky but achievable).

Do you mind to give it a look? Flettu

StephenCleary commented 5 years ago

I'll take a look. I'm generally against recursive locks for design reasons: https://blog.stephencleary.com/2013/04/recursive-re-entrant-locks.html

But I understand their appeal. Until the latest version of AsyncEx, it shipped with example code that implemented recursive async locks.