Discussion:
[chromium-discuss] How to get the arguments for a task in message loop
l***@pku.edu.cn
2018-07-17 13:37:44 UTC
Permalink
Hi all,

I know that `PostTask(FROM_HERE, base::bind(..))` can be utilized to
generate a task into thread's message loop. I find that
`TaskAnnotator:RunTask` executes a pending task. Now I want to get the real
arguments for a pending task in `TaskAnnotator:RunTask`.

```
void TaskAnnotator::RunTask(const char* queue_function,
PendingTask* pending_task) {
...
// before this task runs, I want to get the corresponding function name
and arguments
std::move(pending_task->task).Run();
...
}
```

I try to read `OnceCallback` class, but it is hard for me to understand. Is
there any solution? If I cannot directly get these arguments, please tell
me how to add a new function in `OnceCallback ` class or anything else to
figure it out. Great thanks.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...