Skip to content

use of parking_lot send_guard feature prevents use of deadlock_detection in overall program #553

Open
@wez

Description

@wez

Not sure what you think of this, but I'm trying to track down an issue that manifests like a deadlock, and I'd like to use parking_lot's deadlock_detection feature to to see if it can help with this.

The use of send_guard here in mlua when send is enabled is not compatible with that feature and prevents the program from compiling with a compile error.

If I build against mlua from git with this quick and dirty patch:

diff --git a/Cargo.toml b/Cargo.toml
index 91f373b..82c071b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,7 +38,8 @@ luau-vector4 = ["luau", "ffi/luau-vector4"]
 vendored = ["ffi/vendored"]
 module = ["dep:mlua_derive", "ffi/module"]
 async = ["dep:futures-util"]
-send = ["parking_lot/send_guard", "error-send"]
+send = ["error-send"]
 error-send = []
 serialize = ["dep:serde", "dep:erased-serde", "dep:serde-value", "bstr/serde"]
 macros = ["mlua_derive/macros"]

then my overall program continues to compile and will allow me to enable deadlock_detection.

Can we find a way to allow the embedding program to opt-in or opt-out of using send_guard?

AFAICT from a quick look, it was added in #147 to facilitate external usage, so it doesn't appear as though mlua requires that feature at all.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions