Skip to content

Possibility to remove Mutex in UpdateManager.AcquireUpdateLock? #79

@jpiechowiak

Description

@jpiechowiak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions