Changeset 242 for branches/eraser6/Manager/DirectExecutor.cs
- Timestamp:
- 3/11/2008 2:18:32 PM (5 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Manager/DirectExecutor.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Manager/DirectExecutor.cs
r240 r242 183 183 { 184 184 lock (tasksLock) 185 { 186 //Load the list into the dictionary 185 187 tasks = (Dictionary<uint, Task>)new BinaryFormatter().Deserialize(stream); 188 189 //Ignore the next portion if there are no tasks 190 if (tasks.Count == 0) 191 return; 192 193 lock (unusedIdsLock) 194 { 195 //Find gaps in the numbering 196 nextId = 1; 197 foreach (uint id in tasks.Keys) 198 { 199 while (id > nextId) 200 unusedIds.Add(++nextId); 201 ++nextId; 202 } 203 204 //Decrement the ID, since the next ID will be preincremented 205 //before use. 206 --nextId; 207 } 208 } 186 209 } 187 210
Note: See TracChangeset
for help on using the changeset viewer.
