     
     func testCustomOnMain() {
         let context = executionContext(main.execute)
+        #if os(Linux)
+            let runRunLoop = true
+        #else
+            let runRunLoop = false
+        #endif
         
 //        syncTest(context)
-        asyncTest(context)
-        afterTest(context)
+        asyncTest(context, runRunLoop: runRunLoop)
+        afterTest(context, runRunLoop: runRunLoop)
         //afterTestAdvanced - no it will not work here
-
-        //We need run loop on Linux
-        #if os(Linux)
-            (RunLoop.main as! RunnableRunLoopType).run(.In(timeout: 2))
-        #endif
     }
     
     func testCustomSimple() {

            expectation.fulfill()
        }
        
        self.waitForExpectations(withTimeout: 2, handler: nil)
    }
    
    func afterTest(context:ExecutionContextType) {
        let expectation = self.expectation(withDescription: "OK AFTER")
        
        context.async(0.5) {
            expectation.fulfill()
        }
        
        self.waitForExpectations(withTimeout: 3, handler: nil)
    }
    
    func afterTestAdvanced(context:ExecutionContextType) {
        var ok = true
        
        context.async(3) {
            ok = false
        }
        
        Thread.sleep(2.0)
        
        XCTAssert(ok)
        
        Thread.sleep(2.0)
        
        XCTAssertFalse(ok)
    }

    
    func testMain() {
        let context:ExecutionContextType = DefaultExecutionContext.main
        #if os(Linux)
            let runRunLoop = true
        #else
            let runRunLoop = false
        #endif
        
        #if !os(Linux)
            syncTest(context)
        #endif
        asyncTest(context, runRunLoop: runRunLoop)
        afterTest(context, runRunLoop: runRunLoop)
        //afterTestAdvanced - no it will not work here
    }
    
    func testCustomOnGlobal() {
