locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
480 stars 129 forks source link

when a variable has a getter or a setter, accessing it blocks the entire tokio executor #175

Open lovasoa opened 2 years ago

lovasoa commented 2 years ago

This is related to but different from #166 : The opcua-server api expects the user to wrap their getters and setters in an std::sync::Mutex (https://docs.rs/opcua-server/0.8.1/opcua_server/address_space/variable/struct.Variable.html#method.set_value_setter), which means that two clients accessing the same variable at the same time will lock the entire tokio executor. Is their a reason to have a synchonous instead of an asynchronous mutex here ?