Yes, both inline actions and deferred actions are asynchronous.
Which seems to be synchronous, so can we not assume synchronous behaviour(result is returned by the function call) for inline actions?
No, inline actions are non-blocking: the inline action is queued to be processed after the action is completed, but it is executed in the same transaction.
For the record, inline actions used to be called "synchronous" at some point in the previous versions, but it was clarified here that the terminology was confusing:
I have adopted the terms "inline" and "deferred" to replace "sync" and "async" in the documentation and API as I feel they are more descriptive of the reality of these transactions
- for security reasons, I don't think we want to allow the avenue for opaque re-entrancy and/or recursive wasm-vm contexts that would occur if sending a "synchronous" transaction actually processed synchronously. Instead, we would probably queue it for execution immediately after this transaction/call guaranteeing to the contract that this call will complete in its entirety before any foreign code is run. Thus, "inline". I considered "immediate" but worried that it would imply processing before returning execution to the caller.
- likewise, asynchronous has become an overburdened concept in the modern programming vernacular and is usually associated with some "response" event or callback which we don't have. "deferred" is less burdened and does not currently imply any form of response.