1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/worker_pool.h"
7 #include "base/logging.h"
12 DWORD CALLBACK
WorkItemCallback(void* param
) {
13 Task
* task
= static_cast<Task
*>(param
);
21 bool WorkerPool::PostTask(const tracked_objects::Location
& from_here
,
22 Task
* task
, bool task_is_slow
) {
23 task
->SetBirthPlace(from_here
);
27 flags
|= WT_EXECUTELONGFUNCTION
;
29 if (!QueueUserWorkItem(WorkItemCallback
, task
, flags
)) {
30 DLOG(ERROR
) << "QueueUserWorkItem failed: " << GetLastError();