         private let rl:CFRunLoop!
         private let ownRunLoop:Bool
 
-        private static let defaultMode = "kCFRunLoopDefaultMode".bridge().cfString
+        #if !os(Linux)
+        private static let defaultMode:CFString = "kCFRunLoopDefaultMode" as NSString
+        #else
+        private static let defaultMode:CFString = "kCFRunLoopDefaultMode".bridge().cfString
+        #endif
         
         override init() {
             ownRunLoop = true

        }

        deinit {
            if ownRunLoop { CFRunLoopStop(rl) }
        }
        
        static func defaultLoop() {
            while CFRunLoopRunInMode(defaultMode, 0, true) != Int32(kCFRunLoopRunStopped) {}
        }

        private func performRunLoopSource(rls: RunLoopSource) {
            rls.addToRunLoop(rl, mode: SerialContext.defaultMode)

    private class RunLoopSource {
        private var cfSource:CFRunLoopSource? = nil
        private let task:SafeTask
        private let priority:Int

        init(_ task: SafeTask, priority: Int = 0) {
            self.task = task
            self.priority = priority
        }

        deinit {
