Partially remove dependency on folly async

Summary:
This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers.

Users of Flipper can decide not to use the types defined in that header and implement their own.

NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly.

Reviewed By: fabiomassimo

Differential Revision: D36052198

fbshipit-source-id: 170d64a324a1f1f100224e2622a59cbac3c8b642
This commit is contained in:
Lorenzo Blasa
2022-05-12 17:56:17 -07:00
committed by Facebook GitHub Bot
parent 216c926ca5
commit ade685c621
18 changed files with 132 additions and 116 deletions

View File

@@ -7,8 +7,8 @@
#pragma once
#include <folly/io/async/EventBase.h>
#include <map>
#include "FlipperScheduler.h"
namespace facebook {
namespace flipper {
@@ -30,14 +30,14 @@ struct FlipperInitConfig {
DeviceData deviceData;
/**
EventBase on which client callbacks should be called.
Scheduler on which client callbacks should be called.
*/
folly::EventBase* callbackWorker;
Scheduler* callbackWorker;
/**
EventBase to be used to maintain the network connection.
Scheduler to be used to maintain the network connection.
*/
folly::EventBase* connectionWorker;
Scheduler* connectionWorker;
int insecurePort = 9089;
int securePort = 9088;