Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTim authored Dec 1, 2024
1 parent 41aab1d commit 46eb143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/basics/async.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@ futureString.whenComplete { result in

### Get

In case there is no concurrency-based alternative to an API, you can wait for the future's value using `try await future.get()`.
In case there is no concurrency-based alternative to an API, you can await for the future's value using `try await future.get()`.

```swift
/// Assume we get a future string back from some API
let futureString: EventLoopFuture<String> = ...

/// Wait for the string to be ready
let string = try await futureString.get()
let string: String = try await futureString.get()
print(string) /// String
```

Expand Down

0 comments on commit 46eb143

Please sign in to comment.