Closed chibenwa closed 2 years ago
Hi,
I will take a look in the coming days.
I will be able to make those changes solely in ImapFuture by allowing registrations solely on this object.
When a callback is registered, we modify ImapFuture inner structured then immediately run it if the future is done. This makes it fully transparent from the existing interfaces and allows its use for the full asynchronous API, not just for the exec
method.
Would this be an evolution of this work that would be welcomed?
Regards,
Benoit
Hello,
Any input on this topic dear imapnio maintainers?
Best regards,
Benoit TELLIER
Cool!
As a side question, when to expect a 4.3.8
so that I can drop my fork?
Best regards,
Benoit
@chibenwa We just upgrade to 4.3.8, artifacts will be published within a day.
This allow avoiding blocking in calling code to unwrap the future and access the inner value. This empowers reactive/asynchronous/actor systems integrations.
I chose the callback approach instead of using CompletableFuture in order to minimize code changes.
Description
Adds callbacks to ImapFuture
Motivation and Context
Needs to call ImapFuture.get to do anything usefull with this library however it blocks and defeat any reactive/asynchronous/actor system use of this library.
How Has This Been Tested?
Unit test. I will also ensure timely that this solves my original issue.
Screenshots (if appropriate):
Types of changes
Checklist:
Javadoc.