Tornado 6.5 Documentation
decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking functions Parallelism Interleaving Looping Running in the background Queue example - a concurrent web spider application The main coroutine The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler methods Error Handling Redirection Asynchronous handlers Templates and why CPU blocking must be taken as seriously as other kinds of blocking, consider password hashing functions like bcrypt [http://bcrypt.sourceforge.net/], which by design use hundreds of milliseconds of CPU0 码力 | 437 页 | 405.14 KB | 2 月前3Tornado 6.5 Documentation
why CPU blocking must be taken as seriously as other kinds of blocking, consider password hashing functions like bcrypt, which by design use hundreds of milliseconds of CPU time, far more than a typical network background before triggering some future action in the application (as opposed to normal synchronous functions, which do every- thing they are going to do before returning). There are many styles of asynchronous Callback registry (e.g. POSIX signals) Regardless of which type of interface is used, asynchronous functions by definition interact differently with their callers; there is no free way to make a synchronous0 码力 | 272 页 | 1.12 MB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
让我们一起动手完成一个项目来快速上手 Rust!本章将介绍一些 Rust 中常见的概念,并通过 真实的程序来展示如何运用它们。你将会学到 let、match、方法(methods)、关联函数 (associated functions)、外部 crate 等知识!后续章节会深入探讨这些概念的细节。在这一 章,我们将主要练习基础内容。 我们会实现一个经典的新手编程问题:猜数字游戏。游戏的规则如下:程序将会生成一个 1 到 100 文件名:src/main.rs use std::io; fn main() { println!("Guess the number!"); println!("Please input your guess."); let mut guess = String::new(); io::stdin() .read_line(&mut guess) 作为函数体的开始。 第一章也提及了 println! 是一个在屏幕上打印字符串的宏: println!("Guess the number!"); println!("Please input your guess."); 这些代码仅仅打印提示,介绍游戏的内容然后请求用户输入。 使用变量储存值 接下来,创建一个 变量(variable)来储存用户输入,像这样: 23/562Rust0 码力 | 562 页 | 3.23 MB | 10 天前3
共 3 条
- 1