Skip to content

Commit 25595b4

Browse files
committed
Make RedisConnection use its queue
1 parent 58ac3c1 commit 25595b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/Redis/RedisConnection.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ public final class RedisConnection {
1212

1313
public func get(
1414
_ key: String,
15-
queue: DispatchQueue = .main,
1615
_ callback: @escaping (Result<String?, Error>
1716
) -> Void) {
1817
// TODO: Make this a generic method to avoid copy/paste
1918
driverConnection.get(key)
2019
.map { result in
21-
queue.async { callback(.success(result)) }
20+
self.queue.async { callback(.success(result)) }
2221
}
2322
.whenFailure { error in
24-
queue.async { callback(.failure(error)) }
23+
self.queue.async { callback(.failure(error)) }
2524
}
2625
}
2726
}

0 commit comments

Comments
 (0)