Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dikaiosune
· 8y ago · 0 comments
Re: non-thread-safe items in lazy_static, you can also wrap them in a mutex within just the lazy_static so the struct only uses synchronization when it actually needs to be thread-safe.
Comments
[–]
dbaupp
8y ago
That removes the Sync requirement, but still requires Send, so doesn't completely resolve the requirement for thread-safety (e.g. Rc can't be stored).