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

Make android_wakelock::Guard Send #1

Open
Niels-Be opened this issue Oct 28, 2023 · 0 comments
Open

Make android_wakelock::Guard Send #1

Niels-Be opened this issue Oct 28, 2023 · 0 comments

Comments

@Niels-Be
Copy link

Im not sure if there currently is a way to do this.

But right now I think there is no way to use the android_wakelock::Guard across an await boundary because of its raw pointers stored in env.

I would like to acquire the wakelock, run some async tokio code and only after this is done release the lock.

I don't see why the attached thread needs to be stored inside the guard? The Java API should be thread save.

So can't you just attach a new env on release?

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

1 participant