Skip to content

Make android_wakelock::Guard Send #1

@Niels-Be

Description

@Niels-Be

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions