# \[Concurrency\] Asynchronous functions

**URL:** <https://forums.swift.org/t/concurrency-asynchronous-functions/41619>\
**Category:** Pitches\
**Tags:** concurrency\
**Created:** [October 30, 2020, 6:35pm UTC](https://forums.swift.org/t/concurrency-asynchronous-functions/41619 "2020-10-30T18:35:30Z")\
**Posts on this page:** 1\
**Showing post:** 62

<div class="post-metadata">

**Author:** ![John\_Lin](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/john_lin/32/1944_2.png) [@John\_Lin](https://forums.swift.org/u/John_Lin)\
**Post date:** [November 1, 2020, 12:03pm UTC](https://forums.swift.org/t/concurrency-asynchronous-functions/41619/62 "2020-11-01T12:03:23Z")

</div>

> [@unixzii](#):
>
> This can be implemented by simply wrapping the `Task.runDetached` method like this:
> 
> ```swift
> func asyncWrapper<T>(_ operation: () async -> T, completion: (T) -> Void) {
> let _ = Task.runDetached {
> let result = await operation()
> completion(result)
> }
> }
> 
> ```
> 
> This is useful, look forward to a polished way to do so.

Thanks for great solution,  
the `public func get() async throws -> Success { ... }`  
interface make it looks like it requires another `await`.  
Maybe we should have a `public func get(completion: (Success)->Void) throws -> Void` interface as well.  
But that should belongs to the structured concurrency thread.

---

_[View the full topic](https://forums.swift.org/t/concurrency-asynchronous-functions/41619)._
