         return self.dispatchEventBlockInternal(minimumQoS: desiredQoS, block: block)
     }
     #if DEBUG
-    public func setSpecific<T>(key: DispatchSpecificKey<T>, value: T) {
-        queue.setSpecific(key: key, value: value)
-    }
-    public func clearSpecific<T>(key: DispatchSpecificKey<T>) {
-        queue.clearSpecific(key: key)
-    }
-    #endif
-}
+    #if swift(>=4.0)
+        public func setSpecific<T>(key: DispatchSpecificKey<T>, value: T?) {
+            queue.setSpecific(key: key, value: value)
+        }
+    #else // Swift 3.x
+        public func setSpecific<T>(key: DispatchSpecificKey<T>, value: T) {
+            queue.setSpecific(key: key, value: value)
+        }
+        public func clearSpecific<T>(key: DispatchSpecificKey<T>) {
+            queue.clearSpecific(key: key)
+        }
+    #endif
+    #endif
+}

        queue.setSpecific(key: key, value: value)
    }
    internal func debugClearTemporaryEventQueueStatusFrom(queue: DispatchQueueProtocol) {
        queue.clearSpecific(key: key)
    }
    #endif


    @discardableResult func asyncDispatch(minimumQoS: DispatchQoS, block: @escaping () -> Void) -> DispatchWorkItem
    func dispatchNotify(withGroup group: DispatchGroup, block: @escaping () -> Void)
    #if DEBUG
    #if swift(>=4.0)
        func setSpecific<T>(key: DispatchSpecificKey<T>, value: T?)
    #else // Swift 3.x
        func setSpecific<T>(key: DispatchSpecificKey<T>, value: T)
        func clearSpecific<T>(key: DispatchSpecificKey<T>)
    #endif
    #endif
}

