Proposal: For Flow<T>
returning functions to not be 'suspending'
#232
chris-hatton
started this conversation in
General
Replies: 1 comment
-
Hey, @chris-hatton ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Clearly, member-functions of RPC Services that return an immediate type need to be
suspending
, reflecting the asynchronous nature of the contract. e.g:Where a member-function returns
Flow<T>
, however, I believe it would be idiomatic for these not to be suspending i.e:...I propose should be:
Flow
s are already asynchronous by nature; they can be returned immediately, and only the first element is delayed as necessary.Making these
suspend
seems redundant - unless I am missing a reason why this has to be?Beta Was this translation helpful? Give feedback.
All reactions