diff options
author | Marek Safar <marek.safar@gmail.com> | 2014-01-14 22:22:48 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2014-01-14 22:23:23 +0400 |
commit | 8f1a0ccce60a5b689f70c013715b419bbd03c56d (patch) | |
tree | 137e6f0209edf51cd60bd070d11bd990340c3c3f /mcs | |
parent | 7d80c22054636d3eb0e1cfa506cca6a0e5ef2982 (diff) |
[corlib] Improve 85aaf9b07485d5253de4c142985e32b00ad19347 change
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System.Threading.Tasks/Task.cs | 3 |
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; |