Update //docs/callback.md for OnceCallback support of PostTask impls
This removes a mention to OnceCallback support of PostTask, since PostTask does support OnceCallback now. BUG=554299 Review-Url: https://codereview.chromium.org/2830223002 Cr-Commit-Position: refs/heads/master@{#466591}
This commit is contained in:
@ -67,11 +67,9 @@ void Baz(OnceCallback<void(int)> cb) {
|
||||
|
||||
// |Qux| takes the ownership of |cb| and transfers ownership to PostTask(),
|
||||
// which also takes the ownership of |cb|.
|
||||
// NOTE: TaskRunner is not actually migrated to OnceClosure yet. Once TaskRunner
|
||||
// supports OnceClosure, a OnceCallback can be posted as follows:
|
||||
void Qux(OnceCallback<void(int)> cb) {
|
||||
PostTask(FROM_HERE,
|
||||
base::BindOnce(std::move(cb), 42)); // not yet implemented!
|
||||
base::BindOnce(std::move(cb), 42));
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user