You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the uni coroutine builder has a suspend modifier. However, this seems to be unnecessary: async itself is not a suspending function and simply returns a Deferred. Removing the suspend modifier then allows us to actually use the uni builder as intended: to call a suspending function (inside the async block) and have it be transformed to a mutiny Uni target. With the suspend modifier present, we would need to use a suspending function to be able to return the Uni - defeating the purpose of this "bridge" between mutiny and coroutines.
Please correct me if I'm missing a detail here, but my naive tests recreating the uni function without the keyword seem to work perfectly fine. The issue seems similar to #1316 and #1323
The text was updated successfully, but these errors were encountered:
Currently, the
uni
coroutine builder has asuspend
modifier. However, this seems to be unnecessary:async
itself is not a suspending function and simply returns aDeferred
. Removing thesuspend
modifier then allows us to actually use theuni
builder as intended: to call a suspending function (inside theasync
block) and have it be transformed to a mutinyUni
target. With thesuspend
modifier present, we would need to use a suspending function to be able to return theUni
- defeating the purpose of this "bridge" between mutiny and coroutines.smallrye-mutiny/kotlin/src/main/kotlin/io/smallrye/mutiny/coroutines/Uni.kt
Lines 72 to 76 in 56848d6
Please correct me if I'm missing a detail here, but my naive tests recreating the
uni
function without the keyword seem to work perfectly fine. The issue seems similar to #1316 and #1323The text was updated successfully, but these errors were encountered: