[ 
https://issues.apache.org/jira/browse/THRIFT-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629576#action_12629576
 ] 

Luke Lu commented on THRIFT-136:
--------------------------------

"async void" in thrift is indeed weird. It's more analogous to "one-way 
invocation" in CORBA and Ice than "asynchronous invocation".

noreturn is confusing as the function in fact returns immediately after the 
message is sent. gcc has a "noreturn" attribute to indicate the function 
actually exits and not returning control to the caller.

May be the easiest way signify a one-way invocation is not specifying any 
return type at all. so async void ping() just becomes ping() in the IDL. and 
"async void" directive can still be used to generate a callback (when the 
server acks) for a async call that returns void.




> Rename "async void" to "noreturn void" or just "noreturn"
> ---------------------------------------------------------
>
>                 Key: THRIFT-136
>                 URL: https://issues.apache.org/jira/browse/THRIFT-136
>             Project: Thrift
>          Issue Type: Improvement
>            Reporter: David Reiss
>            Priority: Minor
>
> "async" is not a very descriptive name for functions that don't return any 
> value.  I suggest that we change this keyword to "noreturn" to free up the 
> term "async" to refer to non-blocking function calls.  Votes?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to