Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Releases: ANSCoder/AsyncGuardKit

1.0.0

01 Mar 19:32
@ANSCoder ANSCoder

Choose a tag to compare

AsyncGuardKit 1.0.0

Structured task lifetime management for Swift concurrency.

What's included

AsyncTask — Wrap async work with an explicit lifetime strategy. Choose .bind(to:), .store(in:), or .detached() at the call site. Tasks that reach deinit without a declared strategy cancel defensively.

AsyncLifetime — Bind tasks to an object's lifecycle. All bound tasks cancel automatically when the lifetime deallocates. Zero deinit code required.

withSingleFlight(key:operation:) — Deduplicate concurrent async operations by key. One execution runs, all callers receive the same result. Actor-backed, type-safe, no force casts.

retry(attempts:backoff:shouldRetry:operation:) — Cancellation-aware retry with .none, .fixed, and .exponential backoff strategies.

AsyncGuard.configure(_:) — Enable structured os.Logger diagnostics in debug builds. Zero overhead in release.

Requirements

Platform Minimum
iOS 16.0
macOS 13.0
tvOS 16.0
watchOS 9.0
Swift 5.9

Installation

.package(url: "https://github.com/ANSCoder/AsyncGuardKit", from: "1.0.0")
Assets 2
Loading

AltStyle によって変換されたページ (->オリジナル) /