Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite
set_logger
function to use std::sync::Once
on std
I split implementations for 3 cases: * When std is available, use standard locking primitive. * When std is not available but there is atomics with pointer size, use spinlock * If there is no atomic with pointer size, assume that there is no threads and use `Cell`. I think, this separation makes easier to understand what is happening in each case.
- Loading branch information