How to use this library with Java now that suspend functions are being used?
Opened this issue · 2 comments
Hey,
I have a java project that uses ocpi-toolkit
and so far it is working great.
My question is, how to use ocpi-toolkit
in java now that suspend functions are used?
I've read about java interoperability with suspend functions and it seems that the interoperability with suspend functions is not really great, or at least not great if ocpi-toolkit
doesn't adapt suspend functions to be used in java(example making use of CompletableFuture or something.
Sources:
https://youtu.be/_hfBv0a09Jc?t=2159 - timestamped video talking little bit about Java interoperability KotlinConf 2017 - Introduction to Coroutines by Roman Elizarov
https://stackoverflow.com/questions/52869672/call-kotlin-suspend-function-in-java-class
Hey, sorry for the late answer. I have never tried, and it sounds like it's complicated to call suspend functions fron java code.
I do not have an answer for your question yet, but I will come back to you if I find something.