Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 6.4 Future-tutorial.md #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zh/chapter6-Future/6.4 Future-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

检查当前的 `std::future` 对象是否有效,即释放与某个共享状态相关联。

一个有效的 `std::future` 对象只能通过 `std::async()`, `std::future::get_future` 或者 `std::packaged_task::get_future` 来初始化。
一个有效的 `std::future` 对象只能通过 `std::async()`, `std::promise::get_future` 或者 `std::packaged_task::get_future` 来初始化。

另外由 `std::future` 默认构造函数创建的 `std::future` 对象是无效(`invalid`)的,当然通过 `std::future` 的 `move` 赋值后该 `std::future` 对象也可以变为 `valid`。

Expand Down