We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8587618 commit 5c7eb0aCopy full SHA for 5c7eb0a
1 file changed
README.md
@@ -14,9 +14,21 @@ A Swift utility that provides a timeout mechanism for asynchronous operations us
14
2. Integrate the `AsyncTimeout` structure into your project.
15
3. Use the static `withTimeout` function to wrap the async operation that you want to time out.
16
17
+### Swift Package Manager
18
+
19
+Add the following to your Package.swift dependencies:
20
21
+```swift
22
+dependencies: [
23
+ .package(url: "https://github.com/RayKitajima/AsyncTimeout.git", from: "1.0.0"),
24
+],
25
+```
26
27
### Example:
28
29
```swift
30
+import AsyncTimeout
31
32
do {
33
let result: YourReturnType = try await AsyncTimeout.withTimeout(seconds: 5) {
34
return try await someAsyncFunc()
0 commit comments