Tornado 6.5 Documentation
Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe. The only method in Tornado that is safe to call from other threads is IOLoop.add_callback referencing any Tornado objects. run_in_executor is the recommended way to interact with blocking code. 7Tornado Documentation, Release 6.5.1 8 Chapter 3. Threads and WSGICHAPTER FOUR ASYNCIO INTEGRATION concurrent connections, Tornado uses a single-threaded event loop. This means that all appli- cation code should aim to be asynchronous and non-blocking because only one operation can be active at a time0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe. The only method in Tornado that is safe to call from other threads is IOLoop.add_callback referencing any Tornado objects. run_in_executor is the recommended way to interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python asyncio — Bridge between asyncio and Tornado Utilities tornado.autoreload — Automatically detect code changes in development tornado.concurrent — Work with Future objects tornado.log — Logging support0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
`target/debug/error-handling` thread 'main' panicked at src/main.rs:8:23: Problem opening the file: Os { code: 2, kind: NotFound, message: "No such file or directory" } note: run with `RUST_BACKTRACE=1` environment 调用 panic! 时提供的 错误信息: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:4:49 同样,expect 方法也允许我们自定义 息。它看起来像这样: thread 'main' panicked at src/main.rs:5:10: hello.txt should be included in this project: Os { code: 2, kind: NotFound, message: "No such file or directory" } 在生产级别的代码中,大部分 Rustaceans 选择 expect 而不是0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1