Skip to content

Instantly share code, notes, and snippets.

@markst
Created March 16, 2017 05:48

Revisions

  1. markst created this gist Mar 16, 2017.
    14 changes: 14 additions & 0 deletions example.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    class MyOperation: Operation {
    open func execute() {

    let realm = try! Realm(configuration: Realm.Configuration(inMemoryIdentifier: "MyInMemoryRealm"))

    // Do some stuff

    networkClient.request(method: method, url: url, payload: payload) { statusCode, responseData, networkError in

    // Now do some stuff on original operation threafd

    }
    }
    }