Introduce global task queue factory.
Bug: webrtc:10191 Change-Id: I7bdc97fd626da955b9194a9a0d8ed4f5aebddf66 Reviewed-on: https://webrtc-review.googlesource.com/c/118120 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26315}
This commit is contained in:
committed by
Commit Bot
parent
8a3b9bf435
commit
baaf911c80
27
api/task_queue/global_task_queue_factory.h
Normal file
27
api/task_queue/global_task_queue_factory.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2019 The WebRTC Project Authors. All rights reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_
|
||||
#define API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// May be called at most once, and before any TaskQueue is created.
|
||||
void SetGlobalTaskQueueFactory(std::unique_ptr<TaskQueueFactory> factory);
|
||||
|
||||
// Returns TaskQueue factory. Always returns the same factory.
|
||||
TaskQueueFactory& GlobalTaskQueueFactory();
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_
|
||||
Reference in New Issue
Block a user