Skip to content

Instantly share code, notes, and snippets.

View marciniwanicki's full-sized avatar

Marcin Iwanicki marciniwanicki

View GitHub Profile
@marciniwanicki
marciniwanicki / gist:e02f1281b4e86ef90f4f
Last active August 29, 2015 14:09
Extension for DDLog (CocoaLumberjack) allows to define own log areas.
//
// MILog.h
//
// Copyright (c) 2014 Marcin Iwanicki
//
/**
// example:
#define HTTP_CLIENT_LOGGER true
#define DAO_LOGGER false
//
// Created by Marcin Iwanicki on 10/07/2018.
// Copyright © 2018 Marcin Iwanicki. All rights reserved.
//
import XCTest
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
import Foundation
public class ConcurrentQueueExecutor<T> {
private let serialQueue = DispatchQueue(label: "SerialQueue")
private let concurrentQueue = DispatchQueue(label: "ConcurrentQueue", attributes: .concurrent)
private let context: ExecutorContext
public init() {
context = ExecutorContext(serialQueue: serialQueue)