1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 21:51:06 +01:00

Expose is_set (#99)

* Expose is_set

* Update doc and changes.md
This commit is contained in:
Bo Yao 2020-02-24 21:55:02 -08:00 committed by GitHub
parent 4f2910c6b3
commit 602db1779e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changes # Changes
## [TBD] - [TBD]
- Expose `System::is_set` to check if current system is running
## [1.0.0] - 2019-12-11 ## [1.0.0] - 2019-12-11
* Update dependencies * Update dependencies

View File

@ -79,8 +79,8 @@ impl System {
}) })
} }
/// Set current running system. /// Check if current system is running.
pub(crate) fn is_set() -> bool { pub fn is_set() -> bool {
CURRENT.with(|cell| cell.borrow().is_some()) CURRENT.with(|cell| cell.borrow().is_some())
} }