Mercurial > pub > ImplabNet
comparison Implab/TaskController.cs @ 76:c761fc982e1d v2
Refactoring of the IPromise<T> interface
Added tests
author | cin |
---|---|
date | Wed, 10 Sep 2014 17:53:05 +0400 |
parents | 9bf5b23650c9 |
children | f75cfa58e3d4 |
comparison
equal
deleted
inserted
replaced
75:4439140706d0 | 76:c761fc982e1d |
---|---|
90 lock (m_lock) | 90 lock (m_lock) |
91 return m_cancelled; | 91 return m_cancelled; |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 public bool Cancel() { | 95 public void Cancel() { |
96 lock (m_lock) { | 96 lock (m_lock) { |
97 if (!m_cancelled) { | 97 if (!m_cancelled) |
98 m_cancelled = true; | 98 m_cancelled = true; |
99 return true; | |
100 } else { | |
101 return false; | |
102 } | |
103 } | 99 } |
104 } | 100 } |
105 | 101 |
106 protected virtual void OnCancelled() { | 102 protected virtual void OnCancelled() { |
107 var temp = Cancelled; | 103 var temp = Cancelled; |