Open vext01 opened 4 years ago
I don't know what changed, but I can't reproduce this any more.
My theory is that the lazy_static initialiser crashed in one thread, leaving this Once
poisoned for other threads.
If that's a thing that can happen, perhaps a more user-friendly message could be printed?
In my case, this happened when the lazy_static
initializer panicked in one thread.
Hi,
I'm trying to track down a crash in a test suite that uses lazy_static.
A
Once
is being poisoned:If the tests are run using one thread, all is well.
So I wonder if there are some concurrency rules that need to be documented?
All I could find was:
Which suggests there is some form of multi-threading capabilities.
FWIW, my
lazy_static
usage is here. It's quite long running (a few seconds) in case that is a factor.This code has been fine up until recently. Perhaps something is racy somewhere?
It wouldn't surprise me if this is user error, so apologies if that's what it turns out to be.
Thanks.