scala-async icon indicating copy to clipboard operation
scala-async copied to clipboard

what if we don't care the response of async execute , but it should be complete

Open ghost opened this issue 3 years ago • 0 comments

For golang , we can execute go routine , and leave it . the request can be done early, but the background go routine will continue execute.

for a short example

func HelloHttpHandle() {
   //execute a background job, like send notify to user, via sms or email.
    go func();
  // the request will complete soon, return json to user http client
   return json;
}

even when the function return json, the function complete. but the background go rountine ,continue to execute , till it's end.

can scala-async do the same thing?

ghost avatar Jul 05 '22 23:07 ghost