On Fri May 17 08:36:29 2024 +0000, Jacek Caban wrote:
Yes, I think it's better. It's hard for me to comment on details of thread input without seeing the code, but it sounds to me that a helper that a helper that returns a pointer from an offset could be just shared between both (and other user objects like windows), while the "locator" is specific to the use case. In this MR, that just adds unnecessary extra server call.
Sure, we can probably try to initialize the desktop / thread message queue cached objects from the requests that change them, but I don't think it's a good idea to treat these objects specifically otherwise.
Objects can be invalidated from the server side by simply changing their id, and clients then have to call wineserver to get the new object id / offset. Of course, right now desktop / queues objects never need to change, but we can very well imagine doing something differently, and I think there's no reason to introduce a different handling on the client side depending on the object types.
Fwiw the full branch is available here: https://gitlab.winehq.org/rbernon/wine/-/tree/wip/shared-memories