1[← Concurrent](8-Concurrent-EN.md) | Asynchronous Call[(中文)](9-Asynchronous-CN.md) | [Package Management →](10-Package-Management-EN.md)
2***
3## Asynchronous Call
4
5### Make an asynchronous call
6Alibaba Cloud Go SDK supports asynchronous calls in two ways:
7
81. Using channel as return values
9    ```go
10    responseChannel, errChannel := client.FooWithChan(request)
11
12    // this will block
13    response := <-responseChannel
14    err = <-errChannel
15    ```
16
172. Use callback to control the callback
18
19    ```go
20    blocker := client.FooWithCallback(request, func(response *FooResponse, err error) {
21        // handle the response and err
22    })
23
24    // blocker which is type of (chan int),is used to control synchronization,when returning 1 means success,and returning 0 means failure.
25    // When <-blocker returns failure,err also will be handled by afferent callback.
26    result := <-blocker
27    ```
28
29***
30[← Concurrent](8-Concurrent-EN.md) | Asynchronous Call[(中文)](9-Asynchronous-CN.md) | [Package Management →](10-Package-Management-EN.md)