reactor / reactor-core

Non-Blocking Reactive Foundation for the JVM
http://projectreactor.io
Apache License 2.0
4.93k stars 1.2k forks source link

Call init() on delegate from TimedScheduler #3876

Closed luukveenis closed 1 month ago

luukveenis commented 1 month ago

This fixes an issue where wrapping a BoundedElasticThreadPerTaskScheduler with Micrometer#timedScheduler() causes it to error out immediately.

The TimedScheduler class doesn't currently override the init() method, so it calls the default from the interface, which delegates to start(). This works fine for other scheduler implementations because they still implement start(), but for the virtual thread scheduler, it simply throws an error. When we wrap it in a timed scheduler, it crashes on this error as soon as init() gets called.

pivotal-cla commented 1 month ago

@luukveenis Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 1 month ago

@luukveenis Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 1 month ago

@luukveenis Thank you for signing the Contributor License Agreement!

chemicL commented 1 month ago

@luukveenis thanks! I took the liberty to add a test to your PR.

luukveenis commented 1 month ago

@luukveenis thanks! I took the liberty to add a test to your PR.

Sorry I meant to add one, thank you!

chemicL commented 1 month ago

Thank you for the contribution, @luukveenis 🚀