1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-08-01 07:51:52 +02:00

Merge pull request #71 from rbtcollins/patch-1

Wait for spawned thread
This commit is contained in:
Nikolay Kim
2018-02-13 14:58:11 -08:00
committed by GitHub

View File

@@ -71,7 +71,7 @@ Here is full source of main.rs file:
```rust
# use std::thread;
# extern crate actix_web;
extern crate actix_web;
use actix_web::*;
fn index(req: HttpRequest) -> &'static str {
@@ -79,6 +79,9 @@ fn index(req: HttpRequest) -> &'static str {
}
fn main() {
# // In the doctest suite we can't run blocking code - deliberately leak a thread
# // If copying this example in show-all mode make sure you skip the thread spawn
# // call.
# thread::spawn(|| {
HttpServer::new(
|| Application::new()