Flutter Engine
The Flutter Engine
concurrent_message_loop_factory.mm
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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.
4
5#include "flutter/fml/concurrent_message_loop.h"
6
7namespace fml {
8
11
12 protected:
13 explicit ConcurrentMessageLoopDarwin(size_t worker_count) : ConcurrentMessageLoop(worker_count) {}
14
15 void ExecuteTask(const fml::closure& task) override {
16 @autoreleasepool {
17 task();
18 }
19 }
20};
21
22std::shared_ptr<ConcurrentMessageLoop> ConcurrentMessageLoop::Create(size_t worker_count) {
23 return std::shared_ptr<ConcurrentMessageLoop>{new ConcurrentMessageLoopDarwin(worker_count)};
24}
25
26} // namespace fml
void ExecuteTask(const fml::closure &task) override
static std::shared_ptr< ConcurrentMessageLoop > Create(size_t worker_count=std::thread::hardware_concurrency())
Definition: ascii_trie.cc:9
std::function< void()> closure
Definition: closure.h:14