send_wrapper icon indicating copy to clipboard operation
send_wrapper copied to clipboard

Use thread local to cache current thread id

Open Berrysoft opened this issue 1 year ago • 0 comments

The calling to std::thread::current() clones an Arc. It is a bit heavy in a most likely single-threaded case. This PR caches the current thread id in a TLS. It should be faster than cloning an Arc.

Berrysoft avatar May 14 '24 09:05 Berrysoft