https://www.tinyash.com/blog/thread-safe-set/