Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for Kotlin coroutines [SPR-15413] #19975
Comments
This comment has been minimized.
This comment has been minimized.
Konrad Kamiński commented I created a pull request. |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented Thanks for contributing this pull request. Kotlin coroutines seems indeed a good fit for I would suggest submitting a similar pull request on kotlinx.coroutines in order to provide such support like it has been done for Reactor |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented Konrad Kamiński I turn this issue into a global coroutine support one, since there may be other areas than Did you experiment with coroutines + Spring WebFlux? After reading the guide to reactive streams with coroutines, it seems to me this is something worth to explore if we can leverage the existing Reactor based infrastructure of Spring WebFlux (via annotation or functional API) to provide the ability to use imperative style code for those who are not confortable with functional APIs. That said we really need to experiment in order to see how this work with backpressure, see if it can enable easily to implement custom operator as advertised, etc. Any sample WebFlux + coroutine application example could help to move this topic forward. |
This comment has been minimized.
This comment has been minimized.
Konrad Kamiński commented I created a proof-of-concept implementation of mixit application with coroutines. I have not yet touched either
In this poc I only covered whatever was needed for the |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented That's super useful Konrad Kamiński thank you! I will have a deeper look to this branch and send you my feedback. |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented I have submitted a pull-request on kotlinx.coroutines to upgrade Reactor coroutine support from |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented Reactor Bismuth and Spring Framework 5 support is now available as part of kotlinx.coroutines 0.19.1. |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented Konrad Kamiński Now that Spring Framework 5 and Reactor Core 3.1 are GA + are supported in |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented Some additional thoughts about bridging Reactor-based APIs to Coroutines based on your previous experiment. For streaming use case, For non streaming use cases, maybe most of the time translating
|
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented See this PR comment. |
This comment has been minimized.
This comment has been minimized.
Sébastien Deleuze commented A quick update:
|
spring-issuemaster
added this to the 5.2 RC1 milestone
Jan 11, 2019
spring-issuemaster
assigned
sdeleuze
Jan 11, 2019
spring-issuemaster
referenced this issue
Jan 11, 2019
Open
Incorrect return type of Kotlin suspending functions [SPR-16515] #21058
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
added a commit
to sdeleuze/spring-framework
that referenced
this issue
Feb 18, 2019
This comment has been minimized.
This comment has been minimized.
Coroutines support for Coroutines extensions use Upcoming expected changes are:
I am also preparing pull-requests for Spring Data MongoDB and Spring Data R2DBC. A demo project is available in this spring-boot-coroutines-demo repository. |
spring-issuemaster commentedApr 4, 2017
•
edited
Konrad Kamiński opened SPR-15413 and commented
Since
1.1
Kotlin supports coroutines. Its library support includes utility functions for converting suspending functions/lambdas to/from CompletableFuture / Deferred. It would be nice to have such support ListenableFuture as well.The API could look as follows:
Affects: 5.0 M5
Issue Links:
Referenced from: pull request #1375
18 votes, 26 watchers