Net: fold websocket and http tokio runtime into one (#31771)

* net: use the same tokio runtime in websocket loader

#31648

* readability

* license
This commit is contained in:
tannal 2024-03-21 14:13:03 +08:00 committed by GitHub
parent 2789e98876
commit 5c0199b568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 19 deletions

View file

@ -0,0 +1,12 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use std::sync::Mutex;
use lazy_static::lazy_static;
use tokio::runtime::Runtime;
lazy_static! {
pub static ref HANDLE: Mutex<Option<Runtime>> = Mutex::new(Some(Runtime::new().unwrap()));
}