Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2018-03-18 05:59:23 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2018-03-18 05:59:23 +0300
commitc00c6fd19b1170b9df9d47ba762517d8ef6bde15 (patch)
tree0302849928e8345fcf0d3fc38510e32e01a98ab5 /Duplicati/Service
parent883922e2f3437ddffc9321dca097a9515ece0171 (diff)
Make fields containing lock objects readonly.
If one of these fields is accidentally reassigned, it's possible for threads to be oblivious to an existing lock. By making the fields readonly, we will be notified at compile-time if we inadvertently redefine one of these fields.
Diffstat (limited to 'Duplicati/Service')
-rw-r--r--Duplicati/Service/Runner.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Duplicati/Service/Runner.cs b/Duplicati/Service/Runner.cs
index ae4300815..c45bb458b 100644
--- a/Duplicati/Service/Runner.cs
+++ b/Duplicati/Service/Runner.cs
@@ -30,7 +30,7 @@ namespace Duplicati.Service
private Action m_onStoppedAction;
private Action<string, bool> m_reportMessage;
- private object m_writelock = new object();
+ private readonly object m_writelock = new object();
private readonly string[] m_cmdargs;