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: D36626483

fbshipit-source-id: add0241caf4af0aa5c3b5c2e7efc2e725f5400ab
This commit is contained in:
Lorenzo Blasa
2022-05-25 15:58:05 -07:00
committed by Facebook GitHub Bot
parent 9c7850604c
commit e44cad5e99
18 changed files with 132 additions and 116 deletions

View File

@@ -7,11 +7,10 @@
#pragma once
#include <folly/Executor.h>
#include <folly/io/async/EventBase.h>
#include <mutex>
#include "FlipperConnectionManager.h"
#include "FlipperInitConfig.h"
#include "FlipperScheduler.h"
#include "FlipperSocket.h"
#include "FlipperState.h"
@@ -64,8 +63,8 @@ class FlipperConnectionManagerImpl : public FlipperConnectionManager {
int altInsecurePort;
int altSecurePort;
folly::EventBase* flipperEventBase_;
folly::EventBase* connectionEventBase_;
Scheduler* flipperScheduler_;
Scheduler* connectionScheduler_;
std::unique_ptr<FlipperSocket> client_;