Tornado 6.5 Documentation
Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.9 Release notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 6.5.1 2 CONTENTSCHAPTER ONE QUICK LINKS • Current version: 6.5.1 (download from PyPI, release notes) • Source (GitHub) • Mailing lists: discussion and announcements • Stack Overflow • Wiki 3Tornado "__main__": asyncio.run(main()) See the User’s guide for additional information. Thread-safety notes In general, methods on RequestHandler and elsewhere in Tornado are not thread-safe. In particular0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
links Current version: 6.5.1 (download from PyPI [https://pypi.python.org/pypi/tornado], release notes) Source (GitHub) [https://github.com/tornadoweb/tornado] Mailing lists: discussion [https://groups for asynchronous code tornado.util — General-purpose utilities Frequently Asked Questions Release notes What’s new in Tornado 6.5.1 What’s new in Tornado 6.5.0 What’s new in Tornado 6.4.2 What’s new in confuse some IDEs.Web framework tornado.web — RequestHandler and Application classes Thread-safety notes Request handlers RequestHandler Entry points RequestHandler.initialize() RequestHandler.prepare()0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
引用的值可能已经被丢弃了,为了使用 Weak所指向的值,我们必须确保其值 仍然有效。为此可以调用 Weak 实例的 upgrade 方法,这会返回 Option >。如果 Rc 值还未被丢弃,则结果是 Some;如果 Rc 已被丢弃,则结果是 None。因为 upgrade 返回一个 Option >,Rust 会确保处理 Some 和 None 的情况,所以它不会返回无效指针。 children: RefCell::new(vec![]), }); println!("leaf parent = {:?}", leaf.parent.borrow().upgrade()); let branch = Rc::new(Node { value: 5, parent: RefCell::new(Weak::new()) borrow().upgrade()); } 示例 15-28:一个 leaf 节点,其拥有指向其父节点 branch 的弱引用 创建 leaf 节点类似于示例 15-27,除了 parent 字段有所不同:leaf 开始时没有父节点,所 以我们新建了一个空的 Weak 引用实例。 351/562Rust 程序设计语言 简体中文版 此时,当尝试使用 upgrade 方法获取 leaf 0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1