Crates.io | better_scoped_tls |
lib.rs | better_scoped_tls |
version | 0.1.1 |
source | src |
created_at | 2022-02-17 08:21:15.751912 |
updated_at | 2023-06-22 13:41:35.716014 |
description | scoped-tls, but with good error message |
homepage | |
repository | https://github.com/swc-project/swc.git |
max_upload_size | |
id | 533955 |
size | 4,451 |
This crate provides an opinionated version of scoped-tls.
Scoped thread local variables created by this crate will panic with a good message on usage without .set
, like
You should perform this operation in the closure passed to `set` of better_scoped_tls::tests::TESTTLS
Syntax is exactly same to the original scoped-tls.