Danil Chapovalov | baaf911 | 2019-01-18 10:09:40 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | #ifndef API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_ |
| 11 | #define API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_ |
| 12 | |
| 13 | #include <memory> |
| 14 | |
| 15 | #include "api/task_queue/task_queue_factory.h" |
| 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | // May be called at most once, and before any TaskQueue is created. |
| 20 | void SetGlobalTaskQueueFactory(std::unique_ptr<TaskQueueFactory> factory); |
| 21 | |
| 22 | // Returns TaskQueue factory. Always returns the same factory. |
| 23 | TaskQueueFactory& GlobalTaskQueueFactory(); |
| 24 | |
| 25 | } // namespace webrtc |
| 26 | |
| 27 | #endif // API_TASK_QUEUE_GLOBAL_TASK_QUEUE_FACTORY_H_ |