1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 23:30:36 +02:00

remove RUNNING Q PENDING thread locals from actix-rt (#207)

This commit is contained in:
fakeshadow
2020-12-27 07:26:02 +08:00
committed by GitHub
parent 43ce25cda1
commit 518bf3f6a6
10 changed files with 273 additions and 274 deletions

View File

@ -83,15 +83,18 @@ impl TestServer {
// run server in separate thread
thread::spawn(move || {
let sys = System::new("actix-test-server");
let mut sys = System::new("actix-test-server");
let tcp = net::TcpListener::bind("127.0.0.1:0").unwrap();
let local_addr = tcp.local_addr().unwrap();
Server::build()
.listen("test", tcp, factory)?
.workers(1)
.disable_signals()
.start();
sys.block_on(async {
Server::build()
.listen("test", tcp, factory)
.unwrap()
.workers(1)
.disable_signals()
.start();
});
tx.send((System::current(), local_addr)).unwrap();
sys.run()