백엔드 호출에서 비동기를 구현하려고하는데, 읽고있는 중이며 GParse가 이것을 구현하는 좋은 라이브러리 인 것처럼 보입니다.하지만이 방법을 구현할 수있는 방법은 분명하지 않습니다. 올바른 길. 누구든지 나를 도울 수 있습니까? 이건 내 예입니다GParse call BackendService async
def itemsResults
def locationResults
def itemsNearLocation
GParsPool.withPool {
itemsResults = {searchMyItems()}.async().call()
locationResults = {getLocations()}.async().call()
itemsNearLocation = {getItemsNear(locationResults)}.async().call() // i need locationresults answer in order to call this service
}
model.putAll(["items": itemsResults,
"itemsNearLocation":itemsNearLocation])
return "myView"
그래서, 내가 전에 비동기라는 응답 중 하나를 사용하는 데 필요한 세 번째에 다음이 API를 호출과 전화, 그리고 마지막으로 내 모델이 추가해야합니다. 내가 어떻게 이걸 얻을 수 있니?
가 (HTTP [데이터 흐름]에 대한 좋은 사례가 될 수 있습니다. gpls.org/1.0.0/guide/guide/dataflow.html) –