Skip to content

Commit

Permalink
Make thread local equality check type-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
nvzqz committed Jul 25, 2017
1 parent cdc8e65 commit 338ee43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Threadly.swift
Expand Up @@ -201,11 +201,11 @@ extension ThreadLocalRetrievable {
}

/// Returns a Boolean value that indicates whether the two arguments have equal values.
public func ==<T>(lhs: ThreadLocal<T>, rhs: ThreadLocal<T>) -> Bool {
public func ==<T, U>(lhs: ThreadLocal<T>, rhs: ThreadLocal<U>) -> Bool {
return lhs._def == rhs._def
}

/// Returns a Boolean value that indicates whether the two arguments have equal values.
public func ==<T>(lhs: DeferredThreadLocal<T>, rhs: DeferredThreadLocal<T>) -> Bool {
public func ==<T, U>(lhs: DeferredThreadLocal<T>, rhs: DeferredThreadLocal<U>) -> Bool {
return lhs._key.raw == rhs._key.raw
}

0 comments on commit 338ee43

Please sign in to comment.