mirror of https://github.com/fafhrd91/actix-net
update rt changelog
This commit is contained in:
parent
36a61469e4
commit
010b557492
|
@ -1,6 +1,9 @@
|
|||
# Changes
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
* Add `Arbiter::try_current` for situations where thread may or may not have Arbiter context. [#408]
|
||||
|
||||
[#408]: https://github.com/actix/actix-net/pull/408
|
||||
|
||||
|
||||
## 2.3.0 - 2021-10-11
|
||||
|
|
|
@ -244,7 +244,7 @@ impl Arbiter {
|
|||
///
|
||||
/// Returns `None` if no Arbiter has been started.
|
||||
///
|
||||
/// Contrary to [`current`](Self::current), this never panics.
|
||||
/// Unlike [`current`](Self::current), this never panics.
|
||||
pub fn try_current() -> Option<ArbiterHandle> {
|
||||
HANDLE.with(|cell| cell.borrow().clone())
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ impl System {
|
|||
///
|
||||
/// Returns `None` if no System has been started.
|
||||
///
|
||||
/// Contrary to [`current`](Self::current), this never panics.
|
||||
/// Unlike [`current`](Self::current), this never panics.
|
||||
pub fn try_current() -> Option<System> {
|
||||
CURRENT.with(|cell| cell.borrow().clone())
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ impl ServerInner {
|
|||
self.waker_queue.wake(WakerInterest::Stop);
|
||||
|
||||
// stop workers
|
||||
let stop = self
|
||||
let workers_stop = self
|
||||
.worker_handles
|
||||
.iter()
|
||||
.map(|worker| worker.stop(graceful))
|
||||
|
@ -269,7 +269,7 @@ impl ServerInner {
|
|||
Some(Box::pin(async move {
|
||||
if graceful {
|
||||
// wait for all workers to shut down
|
||||
let _ = join_all(stop).await;
|
||||
let _ = join_all(workers_stop).await;
|
||||
}
|
||||
|
||||
if let Some(tx) = completion {
|
||||
|
|
Loading…
Reference in New Issue