Merge branch 'master' into msbuilddll2
[mono.git] / mcs / class / corlib / System.Threading / CancellationTokenSource.cs
index b82e49f59bfb751b810a4406af15003b593f7152..59637dd0a35e212c5685648d6c1c78d8501bc5ed 100644 (file)
@@ -133,7 +133,7 @@ namespace System.Threading
                        
                        try {
                                Action cb;
-                               for (int id = int.MinValue + 1; id <= currId; id++) {
+                               for (int id = currId; id != int.MinValue; id--) {
                                        if (!callbacks.TryRemove (new CancellationTokenRegistration (id, this), out cb))
                                                continue;
                                        if (cb == null)