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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-01-14 22:22:48 +0400
committerMarek Safar <marek.safar@gmail.com>2014-01-14 22:23:23 +0400
commit8f1a0ccce60a5b689f70c013715b419bbd03c56d (patch)
tree137e6f0209edf51cd60bd070d11bd990340c3c3f /mcs/class
parent7d80c22054636d3eb0e1cfa506cca6a0e5ef2982 (diff)
[corlib] Improve 85aaf9b07485d5253de4c142985e32b00ad19347 change
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs
index 796b863336e..8d75e839516 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs
@@ -351,8 +351,7 @@ namespace System.Threading.Tasks
continuations.Add (continuation);
// Retry in case completion was achieved but event adding was too late
- if (IsCompleted) {
- continuations.Remove (continuation);
+ if (IsCompleted && continuations.Remove (continuation)) {
if (!canExecuteInline)
return false;