Skip to content

Instantly share code, notes, and snippets.

@filip-sakel
filip-sakel / TaskRacing.swift
Last active December 6, 2021 07:55
A Swift implementation concurrency structure safely racing two tasks against each other. This structure is useful for implementing operators like `debounce` for `AsyncSequence`.
//
// TaskRacing.swift
//
// Created by Filip Sakel on 21/6/21.
//
import Dispatch
// MARK: - Utilities