mirror of https://github.com/auygun/kaliber.git
Add comments
This commit is contained in:
parent
0876203d82
commit
05b86a38c1
|
@ -20,6 +20,10 @@ void PostTaskAndReplyRelay(base::Location from,
|
|||
|
||||
namespace base {
|
||||
|
||||
// The task runner that belongs to the thread it's created in. Tasks to be run
|
||||
// on a specific thread can be posted to this task runner.
|
||||
// TaskRunner::GetThreadLocalTaskRunner()->SingleConsumerRun() is expected to be
|
||||
// periodically called.
|
||||
thread_local std::unique_ptr<TaskRunner> TaskRunner::thread_local_task_runner;
|
||||
|
||||
void TaskRunner::CreateThreadLocalTaskRunner() {
|
||||
|
|
|
@ -34,9 +34,9 @@ void ReplyAdapter(std::function<void(ReturnType)> callback,
|
|||
|
||||
// Runs queued tasks (in the form of Closure objects). All methods are
|
||||
// thread-safe and can be called on any thread.
|
||||
// Tasks run in FIFO order. When consumed concurrently by multiple threads, it
|
||||
// doesn't guarantee whether tasks overlap, or whether they run on a particular
|
||||
// thread.
|
||||
// Tasks run in FIFO order when consumed by a single thread. When consumed
|
||||
// concurrently by multiple threads, it doesn't guarantee whether tasks overlap,
|
||||
// or whether they run on a particular thread.
|
||||
class TaskRunner {
|
||||
public:
|
||||
TaskRunner() = default;
|
||||
|
|
Loading…
Reference in New Issue