juju / mutex

Provides a named machine level mutex shareable between processes.
Other
28 stars 11 forks source link

The name validation is too strict #15

Open jotadrilo opened 1 year ago

jotadrilo commented 1 year ago

I understand that the name of the mutex is being validated for a good reason. Today, one of the validations makes sure that the length of the name is not greater than 40 characters.

I can't find why this implementation limits to that specific length, though. According to the Windows docs, I can't find this number:

And I don't think this is a limitation in Linux or MacOS either.

Is this just a safe default limit?

In any case, I believe in some contexts this is too strict and it should be configurable or not required.