Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library with Java now that suspend functions are being used? #22

Open
matevskial opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@matevskial
Copy link

matevskial commented Nov 8, 2023

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

@lilgallon
Copy link
Member

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.

@lilgallon lilgallon added discussion Further information is requested help wanted Extra attention is needed labels Nov 30, 2023
@lilgallon
Copy link
Member

I want to make this lib 100% compatible with Java without any sort of hack. Issue #110 tracks the development

@lilgallon lilgallon added enhancement New feature or request and removed help wanted Extra attention is needed discussion Further information is requested labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants