Proposal: For Flow<T>
returning functions to not be 'suspending'
#232
Closed
chris-hatton
started this conversation in
General
Replies: 2 comments
-
Hey, @chris-hatton ! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Done in 0.6.0 |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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