Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to remove Mutex in UpdateManager.AcquireUpdateLock? #79

Open
jpiechowiak opened this issue Apr 10, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@jpiechowiak
Copy link

jpiechowiak commented Apr 10, 2024

Hi,

in our project we are using XWT for Windows/Mac and Framework.
On Mac it under the hood operates on Mono

Unfortunately Mutex is not available there. See:
https://github.com/mono/mono/blob/6be3e701766af6e3971e5ba260ece1a3ab095c08/mcs/class/corlib/System.Threading/Mutex.cs#L183

Is there an option to rewrite code, to not use Mutex?
This method

using var _mut = AcquireUpdateLock();
throws an issue:

System.NotSupportedException: Specified method is not supported.
  at System.Threading.Mutex..ctor (System.Boolean initiallyOwned, System.String name, System.Boolean& createdNew) [0x00006] in <55335301af774faf8fc40779afb6f275>:0
  at (wrapper remoting-invoke-with-check) System.Threading.Mutex..ctor(bool,string,bool&)
  at Velopack.UpdateManager.AcquireUpdateLock () [0x00015] in <066f32c8dc0b43258461fe360bb30c54>:0  

Works perfectly fine on Windows.

@caesay caesay added the enhancement New feature or request label Apr 10, 2024
@caesay
Copy link
Member

caesay commented Apr 10, 2024

What is the benefit to compiling on mono rather than using dotnet 6 native for example?

@jpiechowiak
Copy link
Author

jpiechowiak commented Apr 10, 2024

Probably no benefits, but it is quite large and a little bit old app. Migration will be challenging and time consuming right know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants