You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -246,6 +246,8 @@ Non thread-safe flavor can be added to `core` as well.
246
246
The thread-safe variant is implemented similarly to `std::sync::Once`.
247
247
Crucially, it has support for blocking: if many threads call `get_or_init` concurrently, only one will be able to execute the closure, while all other threads will block.
248
248
For this reason, most of `std::sync::OnceCell` API can not be provided in `core`.
249
+
In the `sync` case, reliably panicking on re-entrant initialization is not trivial.
250
+
For this reason, the implementaion would simply deadlock, with a note that a deadlock might be elevated to panic in the future.
0 commit comments