Skip to content

Does rquickjs consider supporting ReentrantLock for Mut<T>? #454

@HenryLin2000

Description

@HenryLin2000

If I register a RustFunction to quickjs and wrap it as a method which can be called in JS (let's call it js_native_func()). If I need to call some JS engine APIs in this RustFunction, then I need to call the context.with() method for the second time (the first time is when evaluating the JS code with js_native_func()), and a "single-thread deadlock" will occur.
If ReentrantLock can be used, it seems that this problem can be solved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:questionUnclear usage of the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions