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

Implement async functions #27

Open
benkeil opened this issue Jul 6, 2021 · 6 comments
Open

Implement async functions #27

benkeil opened this issue Jul 6, 2021 · 6 comments

Comments

@benkeil
Copy link

benkeil commented Jul 6, 2021

First of all, I love what you did!

It would be nice to use async functions in e.g. ifPresent and wait for them with async

@bromne
Copy link
Owner

bromne commented Jul 8, 2021

Thank you for your support!

Do you mean something like the following?

const optional: Optional<string> = Optional.ofNullable("foo");

optional.ifPresent(async (value) => console.log(value));
optional.ifPresentOrElse(async (value) => console.log(value), async () => console.log("empty"));

@benkeil
Copy link
Author

benkeil commented Jul 21, 2021

Correct

@benkeil
Copy link
Author

benkeil commented Aug 23, 2021

Any chance to doing this? I can also participate.

@bromne
Copy link
Owner

bromne commented Aug 24, 2021

@benkeil
Sorry for no updates...
I welcome your participation.

@mgohin
Copy link

mgohin commented Jan 3, 2024

Would be very nice to have this feature, it's almost 'mandatory' for any backend developments.

@hamidouikene
Copy link

That would be very nice, any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants