Rust 程序设计语言 简体中文版 1.85.0文件名:src/main.rs 398/562Rust 程序设计语言 简体中文版 fn slow(name: &str, ms: u64) { thread::sleep(Duration::from_millis(ms)); println!("'{name}' ran for {ms}ms"); } 在示例 17-22 中,我们使用 slow 在几个 future 中模拟这类 CPU 密集型工作。首先,每个 如果运行代码,你会看到这些输出: 'a' started. 'a' ran for 30ms 'a' ran for 10ms 'a' ran for 20ms 'b' started. 'b' ran for 75ms 'b' ran for 10ms 'b' ran for 15ms 'b' ran for 350ms 'a' finished. 与上一个示例一样,race 仍然在 a 完成后就立刻结束了。两个 程序设计语言 简体中文版 let one_ms = Duration::from_millis(1); let a = async { println!("'a' started."); slow("a", 30); trpl::sleep(one_ms).await; slow("a"0 码力 | 562 页 | 3.23 MB | 22 天前3
Julia 1.11.4any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.5 Documentationany character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2007 页 | 6.73 MB | 3 月前3
Julia 1.11.6 Release Notesany character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2007 页 | 6.73 MB | 3 月前3
julia 1.10.10any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 20.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 20.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.12.0 RC1any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta4any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2057 页 | 7.44 MB | 3 月前3
Julia 1.12.0 Beta3any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2057 页 | 7.44 MB | 3 月前3
julia 1.12.0 beta1any character whatsoever, even a newline, which normally it would not match. Used together, as r""ms, they let the "." match any character whatsoever, while still allowing "^" and "$" to match, respectively missing object, which is the singleton instance of the type Missing. missing is equivalent to NULL in SQL and NA in R, and behaves like them in most situations. 21.1 Propagation of Missing Values missing This follows the well-established rules of three-valued logic which are implemented by e.g. NULL in SQL and NA in R. This abstract definition corresponds to a relatively natural behavior which is best explained0 码力 | 2047 页 | 7.41 MB | 3 月前3
共 24 条
- 1
- 2
- 3













