Is volatile necessary when using a lock to read/write the variable?
On this line, i defined the state as volatile and the code works fine, but I'm wondering if it really needs to be volatile? Multiple threads can read/write the variable but they always lock the
https://github.com/AngryCarrot789/SharpPad/blob/ef18f1767eb7e855e5575ff0457bdd793947f973/SharpPad/Utils/RDA/RapidDispatchActionEx.cs#L38
stateLock firsthttps://github.com/AngryCarrot789/SharpPad/blob/ef18f1767eb7e855e5575ff0457bdd793947f973/SharpPad/Utils/RDA/RapidDispatchActionEx.cs#L38