StyledTextKit icon indicating copy to clipboard operation
StyledTextKit copied to clipboard

Safer locking

Open ahmedk92 opened this issue 2 years ago • 0 comments

I learned about the use of unfair locks from this library. Thanks!

Anyway, today I stumbled upon this StackOverflow answer that mentioned that the direct use of unfair locks in Swift can fail at runtime. The fix is really simple; a pointer wrapper that provides a stable memory address (the assumption the C API makes). Any thoughts about this?

ahmedk92 avatar Mar 07 '22 02:03 ahmedk92