https://kotlinlang.org logo
#spring
Title
# spring
j

Jose Antonio Jimenez

08/04/2020, 10:51 AM
Hi, does anyone know if `@schedule`annotation works with kotlin `suspended`functions?
I can answer that no, does not work
k

krotki

08/05/2020, 2:59 PM
If i remember corectlly @sheduled has it's own pool in spring so I guess you could wrap your suspending function in runbloking blok. This is not optimal, but at least should work.
4 Views