Skip to content

Instantly share code, notes, and snippets.

View briancoyner's full-sized avatar

Brian Coyner briancoyner

View GitHub Profile
import AsyncAlgorithms
/// Prior to Xcode 14.3.0 (Swift 5.8), the `XCTest/XCTestExpectation` was not `Sendable`, and therefore considered
/// unsafe to use across threads. But starting with Xcode 14.3.0, `XCTestExpectation` is now `Sendable` and therefore
/// can be used to signal across threads. Thus making this "Semaphore" no longer needed for asynchronous unit tests that
/// need a way to coordinate progress between different actors/ threads.
struct Semaphore: Sendable {
private let channel = AsyncChannel(element: Void.self)
}
@briancoyner
briancoyner / xcode-build-issues.md
Last active April 28, 2016 19:41
Xcode Build Issues

Collection of Xcode build issues and workarounds

Xcode 7.3 dYSM Hash Mismatch

@briancoyner
briancoyner / OpenSSL
Last active November 5, 2015 15:57
Verify SHA-256 Checksum
# Verify SHA-256 Checksum (OS X)
openssl dgst -sha256 "/path/to/file"
# Verify SHA-1 Checksum (OS X)
openssl dgst -sha1 "/path/to/file"