Rename SonarKitNetworkPlugin

Summary: Renames SonarKitNetworkPlugin

Reviewed By: passy

Differential Revision: D9968092

fbshipit-source-id: 6d5b7761405be9b47e679510ce6fc7f2a84c308b
This commit is contained in:
Pritesh Nandgaonkar
2018-09-21 03:39:57 -07:00
committed by Facebook Github Bot
parent 5d9e9aa402
commit 02ac3ff9cd
26 changed files with 26 additions and 26 deletions

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
*/
#if FB_SONARKIT_ENABLED
#pragma once
#import <dispatch/dispatch.h>
namespace facebook {
namespace flipper {
class DispatchQueue
{
public:
virtual void async(dispatch_block_t block) = 0;
};
class GCDQueue: public DispatchQueue
{
public:
GCDQueue(dispatch_queue_t underlyingQueue)
:_underlyingQueue(underlyingQueue) { }
void async(dispatch_block_t block) override
{
dispatch_async(_underlyingQueue, block);
}
virtual ~GCDQueue() { }
private:
dispatch_queue_t _underlyingQueue;
};
}
}
#endif