2009-09-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mcs / class / corlib / System.Threading / ChangeLog
1 2009-09-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2
3         * Timer.cs: no need to wake up the scheduler when removing the next
4         scheduled item.
5
6 2009-09-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
7
8         * Timer.cs: rewritten. It only has one queue now and it is sorted by
9         due time. Before this changes, it was using a lot of CPU when there
10         were a lot of 'future' timers.
11
12 2009-09-23  Sebastien Pouliot  <sebastien@ximian.com>
13
14         * ExecutionContext.cs: Don't use SecurityContext and don't expose
15         AsyncFlowControl for NET_2_1
16         * ThreadAbortException.cs: Remove ExceptionState from NET_2_1
17         * Thread.cs: Don't expose ApartmentState and remove Suspend and
18         Resume methods for NET_2_1
19         * ThreadPool.cs: Remove GetAvailableThreads and Unsafe* methods
20         for NET_2_1
21
22 2009-09-22  Jb Evain  <jbevain@novell.com>
23
24         * Timer.cs: MONOTOUCH doesn't support remoting, so do not pass
25         true to exitContext when calling WaitOne on a WaitHandle.
26
27 2009-09-22  Sebastien Pouliot  <sebastien@ximian.com>
28
29         * Thread.cs: Remove [Get|Set]CompressedStack for NET_2_1
30
31 2009-09-21  Sebastien Pouliot  <sebastien@ximian.com>
32
33         * Thread.cs: Remove CurrentPrincipal property for NET_2_1
34         * ExecutionContext.cs: Remove Run method for NET_2_1
35
36 2009-09-20  Sebastien Pouliot  <sebastien@ximian.com>
37
38         * EventWaitHandle.cs: Remove AccessControl usage for NET_2_1
39         * Mutex.cs: Remove some ctors and AccessControl usage for NET_2_1
40         * NativeEventCalls.cs: Remove AccessControl usage for NET_2_1
41
42 2009-08-19  Jérémie Laval  <jeremie.laval@gmail.com>
43
44         * ParallelLoopState.cs: Take in account that
45         AtomicBoolean is a class.
46
47 2009-08-19  Jérémie Laval  <jeremie.laval@gmail.com>
48
49         * AtomicBoolean.cs: Turn it into a class
50         * CountdownEvent.cs: Work on cached variable. Make sure
51         count doesn't go under 0.
52
53 2009-08-11  Jérémie Laval  <jeremie.laval@gmail.com>
54
55         * Watch.cs:
56         * SpinWait.cs:
57         * CountdownEvent.cs:
58         * CancellationToken.cs:
59         * ICancelableOperation.cs:
60         * CancellationTokenSource.cs:
61         * CancellationTokenRegistration.cs: Add BOOTSTRAP_NET_4_0.
62
63 2009-08-11  Jérémie Laval  <jeremie.laval@gmail.com>
64
65         * Parallel.cs: Disable While method.
66         * CountdownEvent.cs: Fix method signature.
67         * Barrier.cs: Moved type.
68         * AggregateException.cs: Moved type.
69
70 2009-08-04 Jérémie Laval  <jeremie.laval@gmail.com>
71
72         * SpinLock: Remove unused private methods.
73
74 2009-08-03  Zoltan Varga  <vargaz@gmail.com>
75
76         * Thread.cs: Always call Thread_free_internal from the finalizer, since
77         it frees other things besides the handle. Fixes #527576.
78
79 2009-07-31  Jérémie Laval  <jeremie.laval@gmail.com>
80
81         * Snzi.cs:
82         * Parallel.cs:
83         * SpinLock.cs:
84         * SpinWait.cs:
85         * ThreadLocal.cs:
86         * SemaphoreSlim.cs:
87         * CountdownEvent.cs:
88         * ManualResetEventSlim.cs
89         * CancellationTokenSource.cs: Various 4.0 b1 API mismatch fixes.
90
91 2009-07-30 Jérémie Laval  <jeremie.laval@gmail.com>
92
93         * AggregateException.cs:
94         * AtomicBoolean.cs:
95         * Barrier.cs:
96         * CSnzi.cs:
97         * CancellationToken.cs:
98         * CancellationTokenRegistration.cs:
99         * CancellationTokenSource.cs:
100         * CountdownEvent.cs:
101         * ICancelableOperation.cs:
102         * LazyInitializer.cs:
103         * ManualResetEventSlim.cs:
104         * Parallel.cs:
105         * ParallelLoopResult.cs:
106         * ParallelLoopState.cs:
107         * ParallelOptions.cs:
108         * SemaphoreSlim.cs:
109         * Snzi.cs:
110         * SpinLock.cs:
111         * SpinWait.cs:
112         * ThreadLocal.cs:
113         * Watch.cs: Add ParallelFx files for System.Threading namespace
114
115 2009-07-21  Jb Evain  <jbevain@novell.com>
116
117         * ThreadPool.cs: avoid an unecessary method call when not running
118         in moonlight.
119
120 2009-07-20  Jb Evain  <jbevain@novell.com>
121
122         * Thread.cs: use the moonlight specific thread start
123         hack for the net_2_1 profile exclusively.
124
125 2009-06-25  Miguel de Icaza  <miguel@novell.com>
126
127         * Timer.cs: Throw ArgumentNullException if the callback is null. 
128
129 2009-06-22  Bill Holmes  <billholmes54@gmail.com>
130
131         * Thread.cs : Adding interrupt_on_stop field.
132
133         Contributed under MIT/X11 license.
134
135 2009-06-10  Rolf Bjarne Kvinge  <RKvinge@novell.com>
136
137         * Thread.cs: MoonlightUnhandledException: ensure there's no way to
138         reach native code with a managed exception.
139
140 2009-06-10  Sebastien Pouliot  <sebastien@ximian.com>
141
142         * Thread.cs: Refactor calling Moonlight's OnUnhandledException to 
143         make sur the delegate it not called from a [SecuritySafeCritical]
144         caller.
145         * ThreadPool.cs: Reuse the above code for QueueUserWorkItem. 
146         Original patch from Alan McGovern
147
148 2009-06-10  Marek Safar  <marek.safar@gmail.com>
149
150         * LockRecursionException.cs: New file.
151
152 2009-04-21  Mark Probst  <mark.probst@gmail.com>
153
154         * Thread.cs: Make the execution context field thread-static to
155         avoid it being shared between app domains.
156
157 2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>
158
159         * Thread.cs: For 2.1 ensure exceptions in threads are handled using the
160         UnhandledException event mechanism in System.Windows.Application instead
161         of crashing the application.
162
163 2009-04-18  Mark Probst  <mark.probst@gmail.com>
164
165         * Thread.cs: Don't keep the current number formatter here because
166         it's shared between app domains.
167
168 2009-04-18  Mark Probst  <mark.probst@gmail.com>
169
170         * Thread.cs: Make the abort exception state a GC handle, to
171         properly separate AppDomains.  Add internal method for getting the
172         state object.
173
174         * ThreadAbortException.cs: Get the abort exception state via the
175         method in Thread.
176
177 2009-04-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
178
179         * WaitHandle.cs: implemented 2 missing WaitAny overloads.
180
181 2009-03-05 Rolf Bjarne Kvinge  <RKvinge@novell.com>
182
183         * WaitHandle.cs: Added missing WaitOne overload.
184
185 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
186
187         * WaitHandle.cs: implemented SignalAndWait.
188
189 2009-02-18  Jb Evain  <jbevain@novell.com>
190
191         * SynchronizationContext.cs: add NET_2_1 SetThreadStaticContext
192         method, even if already obsolete.
193
194 2009-01-30  Andreia Gaita  <avidigal@novell.com>
195
196         * SynchronizationContext.cs: Remove moonlight hacks, dispatcher should
197         be able to handle this now.
198
199 2008-12-20  Miguel de Icaza  <miguel@novell.com>
200
201         * WaitHandle.cs: Add two overloads that were introduced in 3.5.
202
203 2008-11-25  Geoff Norton  <gnorton@novell.com>
204
205         * SynchronizationContext.cs: A temporary horrible hack to SyncContext
206         to hard-wire all calls back to the main thread (moonlight-only) so that
207         we can use our unit test harness.  This will be fixed for 2.1 when we
208         implement Dispatcher properly.
209
210 2008-10-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
211
212         * Interlocked.cs: make CompareExchange internal in 1.1 for use by the
213         runtime.
214
215 2008-09-19  Miguel de Icaza  <miguel@novell.com>
216
217         * WaitHandle.cs (WaitOne): Add new 3.5 SP1 overload.
218
219 Tue Sep 16 21:02:59 CEST 2008 Paolo Molaro <lupus@ximian.com>
220
221         * Thread.cs: fixed SpinWait() implementation (bug #423582).
222
223 Tue Sep 9 15:19:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
224
225         * Timer.cs: use a separate queue for timers that are far in the future
226         so they don't need to be looked at as often (bug #418272).
227         Better precision of recheduling time.
228
229 2008-07-03  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
230
231         * ThreadPool.cs:
232         * LockCookie.cs:
233         * Interlocked.cs:
234         * ExecutionContext.cs:
235         * AsyncFlowControl.cs:
236         * AbandonedMutexException.cs: Fix parameter names
237
238 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
239
240         * Timer.cs (SchedulerThread): Iterate through the keys of the hashtable instead
241         of key-value pairs.
242
243 2008-06-18  Kornél Pál  <kornelpal@gmail.com>
244
245         * Thread.cs: Implement BeginThreadAffinity and EndThreadAffinity as no-op
246         because managed and native threads are currently bound together.
247
248 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
249
250         * Thread.cs: Sync layout with unmanaged side.
251
252 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
253
254         * Monitor.cs: Implement Enter/Exit directly as icalls without managed wrapper
255         methods.
256
257 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
258
259         * Thread.cs: Make in_currentculture non-static. Fixes #378892.
260
261 2008-04-07  Dick Porter  <dick@ximian.com>
262
263         * Thread.cs: Fix throwing of exceptions when manipulating
264         ApartmentState.  Fixes part of bug 324338.
265
266 2008-04-01: Eyal Alaluf <eyala@mainsoft.com>
267
268         * Thread.cs: Put a NumberFormatter instance as a member of the current
269           thread so it can reused for performint ToString conversions.
270
271 2008-03-26  Massimiliano Mantione <massi@ximian.com>
272         * Thread.cs: Renamed "unused6" because it will be used to hold
273         the "mono_thread_manage" callback.
274
275 Tue Feb 26 17:51:58 CET 2008 Paolo Molaro <lupus@ximian.com>
276
277         * Timer.cs: use a monotonic clock to schedule timers
278         (fixes part of bug#347476).
279
280 Fri Feb 22 11:23:53 CET 2008 Paolo Molaro <lupus@ximian.com>
281
282         * Thread.cs: implemented Begin/EndCriticalRegion.
283
284 2008-02-03  Sebastien Pouliot  <sebastien@ximian.com>
285
286         * WaitHandle.cs: Ifdef out some unused code (found by Gendarme).
287
288 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
289
290         * Thread.cs (set_CurrentCulture): If the culture is read-only, cache the result
291         of serializing it.
292         (set_CurrentUICulture): Ditto.
293
294 2008-01-03  Zoltan Varga  <vargaz@gmail.com>
295
296         * Thread.cs (set_CurrentCulture): Avoid the serialization overhead if
297         the new culture is equal to the old one.
298
299 2007-12-27  Zoltan Varga  <vargaz@gmail.com>
300
301         * Thread.cs: Change the type of synch_cs to an IntPtr to be in synch with the
302         unmanaged definition.
303
304 2007-11-20  Atsushi Enomoto  <atsushi@ximian.com>
305
306         * ReaderWriterLock.cs : ... and avoid extra finalizer call.
307
308 2007-11-20  Atsushi Enomoto  <atsushi@ximian.com>
309
310         * ReaderWriterLock.cs : adding missing 2.0 destructor (does nothing).
311
312 Thu Nov 8 18:36:25 CET 2007 Paolo Molaro <lupus@ximian.com>
313
314         * Timer.cs: if period is 0 with a non-infinite due time, we
315         run the callback just once (bug #340212).
316
317 2007-10-24  Dick Porter  <dick@ximian.com>
318
319         * Thread.cs: Call Thread_init on the new 2.0 constructors too.
320
321 2007-10-24  Dick Porter  <dick@ximian.com>
322
323         * Thread.cs: Assign the ManagedThreadId when it is asked for,
324         rather than in the constructor, so ThreadPool threads also work.
325         Fixes bug 335579 (and doesn't break 325367 or 325566)
326
327 2007-10-24  Atsushi Enomoto  <atsushi@ximian.com>
328
329         * SynchronizationContext.cs : removed SendOrPost().
330
331 Wed Oct 17 13:24:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
332
333         * Timer.cs: better cleanup test for the expired array.
334
335 Tue Oct 16 17:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
336
337         * Timer.cs: remove expired timers from the the jobs list.
338
339 Tue Oct 16 12:14:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
340
341         * Timer.cs: rewrote to use threadpool threads to invoke the callbacks,
342         avoid Thread.Abort and Thread.Interrupt and use a single scheduler
343         thread, partially from the patch of Rafael Ferreira in bug #315999.
344         Fixes bug #315999, #332206.
345
346 2007-10-15  Dick Porter  <dick@ximian.com>
347
348         * Thread.cs: Initialise synch_cs to null now we aren't using it as
349         a monitor lock
350
351 2007-09-25  Dick Porter  <dick@ximian.com>
352
353         * Thread.cs: Keep ManagedThreadId constant over the lifetime of a
354         Thread.  Patch from jlarimer@gmail.com fixing bugs 325367 and
355         325566.
356
357 2007-09-25  Jonathan Pobst  <monkey@jpobst.com>
358
359         * SynchronizationContext.cs: Implement SetSynchronizationContext.
360
361 2007-09-06  Dick Porter  <dick@ximian.com>
362
363         * Timer.cs: Only hold a WeakReference to the runner thread, to
364         work around an issue when finalizing at shutdown or (I think)
365         appdomain unload.  (Basically, the Thread was being finalized
366         first, but the Timer's finalizer was still trying to reference it
367         subsequently.)
368
369 2007-08-10  Gert Driesen  <drieseng@users.sourceforge.net>
370
371         * Thread.cs: Throw ThreadStateException when retrieving ApartmentState
372         or IsBackground if thread is stopped. Fixes bug #81658.
373
374 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
375
376         * Thread.cs: Add a fixme.
377
378 2007-07-21  Miguel de Icaza  <miguel@novell.com>
379
380         * WaitHandle.cs (Handle): It turns out that we should never create
381         new SafeWaitHandles, as applications will assume that a
382         SafeWaitHandle pulled from this will be the same after a Handle
383         update (from Gert's test):
384
385         
386                 AutoResetEvent are1 = new AutoResetEvent (false);
387                 AutoResetEvent are2 = new AutoResetEvent (false);
388                 SafeWaitHandle swh1 = are1.SafeWaitHandle;
389                 Console.WriteLine ("#A1:" + !swh1.IsClosed);
390                 Console.WriteLine ("#A2:" + !swh1.IsInvalid);
391                 IntPtr dummyHandle = (IntPtr) 2;
392                 are1.Handle = dummyHandle;
393                 Console.WriteLine ("#A3:" + (are1.Handle == dummyHandle));
394                 Console.WriteLine ("#A4:" + !swh1.IsClosed);
395                 Console.WriteLine ("#A5:" + !swh1.IsClosed);
396                 Console.WriteLine ("#A6:" + !swh1.IsInvalid);
397                 Console.WriteLine ("#A7:" + !are1.SafeWaitHandle.IsClosed);
398                 Console.WriteLine ("#A8:" +
399                 !are1.SafeWaitHandle.IsInvalid);
400
401         We would return in A4, A5, A6 true, even when we have set the
402         Handle ourselves. 
403
404         * 
405
406 2007-07-18  Miguel de Icaza  <miguel@novell.com>
407
408         * WaitHandle.cs (Handle): in the 2.0 profile, explicitly dispose
409         the old SafeWaitHandle, do not wait for the finalizer to run;
410
411         Take ownership of the handle;   The docs did not say that
412         assigning to this value would lead to a leak, the docs said that
413         in the 1.0 and 1.1 profiles assigning to this property might lead
414         to a leak.   My mistake. 
415
416         Fixes: 82134
417         
418 2007-07-09  Atsushi Enomoto  <atsushi@ximian.com>
419
420         * LockCookie.cs, AsyncFlowControl.cs :
421           added missing operator == and !=.
422
423 2007-05-22  Jonathan Chambers  <joncham@gmail.com>
424
425         * Thread.cs: Use & to check ThreadState rather than ==.
426         Fixes AlbumSurfer regression.
427
428 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
429
430         * Thread.cs: Implement ApartmentState related items.
431
432 2007-05-02  Dick Porter  <dick@ximian.com>
433
434         * ReaderWriterLock.cs: ReaderWriterLock derives from
435         CriticalFinalizerObject in the 2.0 profile
436
437 2007-05-01  Dick Porter  <dick@ximian.com>
438
439         * ThreadState.cs: 
440         * AsyncFlowControl.cs: 
441         * Interlocked.cs: 
442         * RegisteredWaitHandle.cs: 
443         * TimerCallback.cs: 
444         * ThreadStateException.cs: 
445         * Monitor.cs: 
446         * ThreadStart.cs: 
447         * WaitOrTimerCallback.cs: 
448         * LockCookie.cs: 
449         * EventWaitHandle.cs: 
450         * WaitHandle.cs: 
451         * ThreadAbortException.cs: 
452         * ThreadPriority.cs: 
453         * ReaderWriterLock.cs: 
454         * NativeOverlapped.cs: 
455         * Mutex.cs: 
456         * Overlapped.cs: 
457         * ThreadPool.cs: 
458         * ApartmentState.cs: 
459         * EventResetMode.cs: 
460         * SynchronizationLockException.cs: 
461         * ManualResetEvent.cs: 
462         * WaitCallback.cs: 
463         * IOCompletionCallback.cs: 
464         * AutoResetEvent.cs: 
465         * AbandonedMutexException.cs: 
466         * SendOrPostCallback.cs: 
467         * ThreadInterruptedException.cs: Update to 2.0 profile
468
469 Thu Apr 19 16:47:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
470
471         * ThreadPool.cs: patch from Robert Jordan to implement
472         ThreadPool.SetMaxThreads.
473
474 2007-04-03  Alp Toker  <alp@atoker.com>
475
476         * Monitor.cs: Class is static in 2.0.
477
478 2007-03-27  Dick Porter  <dick@ximian.com>
479
480         * Mutex.cs: Throw ApplicationException if ReleaseMutex() fails.
481         Fixes bug 79358.
482
483 Tue Jan 23 17:43:50 CET 2007 Paolo Molaro <lupus@ximian.com>
484
485         * Thread.cs: mark the GC-tracked field with UIntPtr.
486
487 2006-12-31  Miguel de Icaza  <miguel@novell.com>
488
489         * ThreadPool.cs: Stub a method.
490
491 2006-12-11  Miguel de Icaza  <miguel@novell.com>
492
493         * WaitHandle.cs: In 2.0 use SafeWaitHandles and the SafeWaitHandle
494         patterns instead of using directly the IntPtr Handle.
495
496         Refactor the code to reuse as much as possible, and follow the new
497         conventions where appropriate. 
498
499 2006-11-07  Robert Jordan  <robertj@gmx.net>
500
501         * WaitHandle.cs: Don't assume Assembly.GetEntryAssembly () !=
502         null.  Fixes bug #79859.
503
504 2006-11-02  Dick Porter  <dick@ximian.com>
505
506         * Thread.cs: Use the new Interrupt and SpinWait icalls.
507
508 2006-07-04  Atsushi Enomoto  <atsushi@ximian.com>
509
510         * WaitHandle.cs : CheckArray() is also used in WaitAny(), so added
511           extra argument to skip STAThread check.
512
513 2006-06-30  Duncan Mak  <duncan@novell.com>
514
515         * WaitHandle.cs (CheckArray): Avoid using reflection unless we
516         really need to.
517
518 2006-06-29  Duncan Mak  <duncan@novell.com>
519
520         * WaitHandle.cs (CheckArray): Throw NotSupportedException if the
521         current thread is marked with the STAThreadAttribute. Fixes bug
522         #78455.
523
524 2006-05-05  Sebastien Pouliot  <sebastien@ximian.com>
525
526         * ExecutionContext.cs: Don't capture the compressed stack unless the 
527         security manager is active (this wasn't ready to be called in 
528         production code).
529
530 2004-04-29  Atsushi Enomoto  <atsushi@ximian.com>
531
532         * Timer.cs : avoid NullReferenceException when it is already disposed.
533           Patch by pawel.sakowski@mind-breeze.com. Fixed bug #78208.
534
535 2004-04-28  Atsushi Enomoto  <atsushi@ximian.com>
536
537         * SynchronizationContext.cs : use ThreadPool in Post(), as suggested
538           by cl (bug #78139).
539
540 2004-04-04  Atsushi Enomoto  <atsushi@ximian.com>
541
542         * Thread.cs : base class is CriticalFinalizerObject.
543         * ThreadStartException.cs : no public constructors.
544
545 Wed Mar 29 18:29:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
546
547         * Thread.cs: update for the runtime changes to culture caching.
548
549 Wed Mar 15 16:35:49 CET 2006 Paolo Molaro <lupus@ximian.com>
550
551         * Thread.cs: updates for LocalDataStoreSlot: we use an array as
552         storage for the slots now so that LocalDataStoreSlot objects an be
553         garbage collected if the user doesn't keep a reference to them.
554
555 2006-02-09  Miguel de Icaza  <miguel@novell.com>
556
557         * Monitor.cs: Patch from Thong Nguyen, Wait (.., Timeout) method
558         should allow a -1 (Timeout.Infinite) to mean indefinite wait (the
559         code already supported this.
560
561         Removed also a LAMESPEC for missing argument checking in Wait with
562         the int argument.
563         
564         Fixed the use of exceptions.
565
566 2005-12-23  Dick Porter  <dick@ximian.com>
567
568         * EventWaitHandle.cs: 
569         * Mutex.cs: Implement OpenExisting
570
571         * NativeEventCalls.cs: Add OpenEvent icall for OpenExisting in
572         2.0.  Add a "created" boolean out parameter to CreateEvent icall.
573
574         * ManualResetEvent.cs: 
575         * AutoResetEvent.cs: Update CreateEvent icall signature (now has
576         "created" boolean out parameter.)
577
578 2005-12-17  Dick Porter  <dick@ximian.com>
579
580         * ThreadStartException.cs: 
581         * EventWaitHandle.cs: 
582         * EventResetMode.cs: 
583         * AbandonedMutexException.cs: New for 2.0 profile
584
585         * ThreadState.cs: 
586         * Interlocked.cs: 
587         * RegisteredWaitHandle.cs: 
588         * Monitor.cs: 
589         * ThreadPriority.cs: 
590         * Mutex.cs: 
591         * ManualResetEvent.cs: 
592         * AutoResetEvent.cs: Updated for 2.0 profile
593
594 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
595
596         * Interlocked.cs: Add T:class constraint to the generic 
597         CompareExchange and Exchange methods.
598
599 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
600
601         * Interlocked.cs: Add generic CompareExchange and Exchange methods.
602
603 2005-11-17  Sebastien Pouliot  <sebastien@ximian.com>
604
605         * WaitHandleCannotBeOpenedException.cs: New (2.0). Is required to 
606         compile the Semaphore tests (in System.dll).
607
608 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
609
610         * SynchronizationContext.cs: A few simple fixes.
611
612 2005-10-06  Sebastien Pouliot  <sebastien@ximian.com>
613  
614         * Thread.cs: Copy an existing IPrincipal to new threads. Fix bug 
615         #76332.
616
617 2005-10-06  Sebastien Pouliot  <sebastien@ximian.com> 
618
619         * Thread.cs: Added new attributes, [ReliabilityContract] for 
620         destructor and [Obsolete] for [Get|Set]CompressedStack, that were 
621         added in 2.0 RC.
622
623 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
624
625         * Thread.cs (MemoryBarrier): Make this an icall.
626
627 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
628
629         * Thread.cs (Interrupt): Make this throw a NotImplementedException.
630
631 2005-09-09  Martin Baulig  <martin@ximian.com>
632
633         * Timer.cs (Timer.Runner.Start): Silently catch
634         ObjectDisposedException and return; works around some race
635         condition on thread abort.      
636
637 2005-08-19  Dick Porter  <dick@ximian.com>
638
639         * Thread.cs: Reserve 64 bits for the thread ID.
640
641 2005-07-19  Martin Baulig  <martin@ximian.com>
642
643         * Timer.cs (Timer.Runner.Start): Fix a race condition which was
644         causing a hang on exit int he debugger: check `!disposed' before
645         `start_event.WaitOne ()' and again after it.
646
647 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
648
649         * Thread.cs: check that the culture is valid for formatting
650         (ie, (!neutral || invariant)).
651
652 2005-06-07  Sebastien Pouliot  <sebastien@ximian.com> 
653
654         * Thread.cs: Added _Thread interface (and members) and a few missing
655         attributes (for both 1.1 and 2.0).
656
657 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
658
659         * Thread.cs Mutex.cs Monitor.cs: Add some missing 2.0 attributes.
660
661 2005-05-29  Sebastien Pouliot  <sebastien@ximian.com> 
662
663         * Timer.cs: Added new constructor for 2.0 and ComVisible attribute.
664         * Timeout.cs: This is a static class in 2.0 and ComVisible attribute.
665
666 2005-05-26  Ben Maurer  <bmaurer@ximian.com>
667
668         * Thread.cs: Use a static object for a lock rather than
669         typeof(Thread).
670
671 2005-05-26  Sebastien Pouliot  <sebastien@ximian.com> 
672  
673         * SynchronizationContext.cs: Re-introduced SendOrPost method as it's 
674         being used in System.Web.Services.
675
676 2005-05-26  Sebastien Pouliot  <sebastien@ximian.com>
677
678         * SynchronizationContext.cs: Updated to beta2 API so it doesn't depend
679         on the switcher structure anymore (which will be removed from the 
680         build).
681
682 2005-05-24  Sebastien Pouliot  <sebastien@ximian.com>
683
684         * Thread.cs: Removed #pragma which aren't supported by CSC 7.x.
685
686 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
687
688         * AsyncFlowControl.cs: Now available, as internal, in NET_1_1. This is
689         required to get some methods from SecurityContext and ExecutionContext
690         working.
691         * CompressedStack.cs: Now includes the current CompressedStack in a new
692         Capture.
693         * ExecutionContext.cs: Includes more methods in NET_1_1 to enable 
694         ThreadPool.UnsafeQueueUserWorkItem to work properly (i.e. without
695         stack propagation).
696         * Thread.cs: Made ExecutionContext field accessible from the runtime.
697         Added stack propagation when Thread.Start is called.
698         * ThreadPool.cs: QueueUserWorkItem now does stack propagation (done in
699         the runtime), so I "fixed" UnsafeQueueUserWorkItem not to do so.
700
701 2005-05-19  Miguel de Icaza  <miguel@novell.com>
702
703         * Thread.cs: REmove warnings.
704
705 2005-05-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
706
707         * Thread.cs: first check for null, then set in_currentculture.
708
709 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
710
711         * Thread.cs: Moved all checks done inside sync_lock to unmanaged code.
712         Merged Thread_internal and Start_internal into a single icall, which
713         does all work.
714
715 2005-05-11  Sebastien Pouliot  <sebastien@ximian.com> 
716
717         * CompressedStack.cs: Allow merging of an existing CompressedStack
718         with the actual stack of the current Thread.
719         * Thread.cs: GetCompressedStack and SetCompressedStack are public 
720         before 2.0 but couldn't be seen with mono-api-info because of it's 
721         LinkDemand for the ECMA public key. Removed unused CompressedStack
722         private field (now part of the ExecutionContext).
723
724 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com> 
725
726         * CompressedStack.cs: GetCompressedStack is public before 2.0 but 
727         couldn't be seen with mono-api-info because of it's LinkDemand for
728         the ECMA public key. Stack capture occurs here if none exists on the
729         current thread.
730
731 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
732
733         * ReaderWriterLock.cs: fix random ApplicationException errors. Tested
734         with the System.Web.Cache stress program. Patch by Eyal Alayuf
735         (Mainsoft). Fixes 74598.
736
737 2005-04-28  Sebastien Pouliot  <sebastien@ximian.com>
738
739         * Thread.cs: Added property to get the ExecutionContext in 2.0. Fixed
740         GetCompressedStack and made SetCompressedStack available (as internal)
741         before NET_2_0.
742
743 2005-04-28  Sebastien Pouliot  <sebastien@ximian.com> 
744  
745         * AsyncFlowControl.cs: Updated wrt beta2.
746         * ExecutionContext.cs: Updated wrt beta2. Class is now internal in 
747         NET_1_1 to allow the compressed stack propagation to other threads.
748         * CompressedStack.cs: Updated wrt beta2. Class is internal in NET_1_1 
749         to allow the compressed stack propagation to other threads.
750         * ContextCallback.cs: Updated wrt beta2.
751         * HostExecutionContext.cs: Updated wrt beta2.
752         * HostExecutionContextManager.cs: Updated wrt beta2.
753         * Thread.cs: Added internal property to get the ExecutionContext.
754
755 2005-04-19  Zoltan Varga  <vargaz@freemail.hu>
756
757         * Thread.cs: Add some unused fields.
758
759 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
760
761         * ThreadPool.cs: BindHandle does nothing now.
762
763 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
764
765         * Thread.cs: clear the Unstarted bit before calling Start_internal.
766         Fixes bug #72738.
767
768 2005-04-04  Ben Maurer  <bmaurer@ximian.com>
769
770         * Thread.cs: Do argument checking for Current[UI]Culture to make
771         the exception more clear for a null value being set.
772
773 2005-03-24  Sebastien Pouliot  <sebastien@ximian.com>
774
775         * CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA 
776         public key on GetCompressedStack method.
777         * Mutex: Added LinkDemand for UnmanagedCode to create named (system 
778         wide) mutexes.
779         * Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
780         CompressedStack methods.
781         * WaitHandle.cs: Added LinkDemand and InheritanceDemand for 
782         UnmanagedCode on set Handle property.
783
784 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
785
786         * Thread.cs: Make slothash a ThreadStatic field. Fixes #65414.
787
788 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
789
790         * Monitor.cs Interlocked.cs: Add net 2.0 ReliabilityContractAttributes.
791
792 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
793
794         * Interlocked.cs: Applied patch from Luca Barbieri (luca.barbieri@gmail.com). Add NET 2.0 methods.
795
796 Tue Feb 15 18:19:11 CET 2005 Paolo Molaro <lupus@ximian.com>
797
798         * Thread.cs: make the slothash a field in MonoThread.
799
800 2005-01-27  Sebastien Pouliot  <sebastien@ximian.com>
801
802         * Overlapped.cs: Added check for ControlPolicy and ControlEvidence for
803         Unsafe pack. Added MonoTODO for missing security stack propagation.
804         * Thread.cs: Add security checks for ControlThread.
805         * ThreadPool.cs: Added declarative security checks.
806
807 Thu Jan 13 18:15:32 CET 2005 Paolo Molaro <lupus@ximian.com>
808
809         * Thread.cs: implement stacksize and parameterized
810         start functionality (requires matching runtime).
811
812 2005-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
813
814         * ThreadAbortException.cs: added private serialization .ctor.
815
816 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
817
818         * CompressedStack.cs: Implemented most todo so it's usable for CAS.
819         * CompressedStackSwitcher.cs: Implemented most todo.
820         * Thread.cs: Implement support for getting/setting CompressedStack.
821
822 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
823
824         * Thread.cs: Change type of culture_info and ui_culture_info to 
825         IntPtr. Implement correct culture handling for the UI culture as
826         well.
827
828 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
829
830         * Thread.cs: Optimize CurrentCulture to avoid initializing the
831         serialization infrastructure in the common case when the culture is
832         not set explicitly.
833
834 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
835
836         * Thread.cs: Add new fields 'serialized_culture_info{_len}'.
837         
838         * Thread.cs (CurrentCulture): Fix leaking of culture info objects 
839         across appdomains. Partially fixes #50049.
840
841 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
842
843         * AutoResetEvent.cs (Set, Reset): If we are disposed, throw a
844         ObjectDisposedEvent, helped track the WebConnection destructor
845         issue. 
846
847 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
848
849         * Timer.cs: don't invoke the callback twice when the timer changes.
850         Fixes bug #66116.
851
852 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
853
854         * Interlocked.cs: Class is static in NET_2_0.
855
856 2004-09-04  Sebastien Pouliot  <sebastien@ximian.com>
857
858         * Thread.cs: Changed an imperative security demand to declarative
859         (unsupported) so it doesn't (for now) call the security runtime.
860
861 2004-08-20  Sebastien Pouliot  <sebastien@ximian.com>
862
863         * Thread.cs: Added Fx 2.0 properties/methods/attributes.
864
865 2004-08-12  Sebastien Pouliot  <sebastien@ximian.com>
866
867         * CompressedStackSwitcher.cs: Added missing [ComVisible] and 
868         [ReliabilityContract] attributes.
869         * ExecutionContext.cs: Added missing [ComVisible] and 
870         [Serializable] attributes.
871         * HostExecutionContext.cs: Added missing [ComVisible] attribute.
872         * HostExecutionContextManager.cs: Added missing [ComVisible] and 
873         [ReliabilityContract] attributes.
874         * HostExecutionContextSwitcher.cs: Added missing Equals and 
875         GetHashCode methods and [ComVisible] and [ReliabilityContract] attrs.
876         * ParameterizedThreadStart.cs: New delegate in NET_2_0.
877         * SendOrPostCallback.cs: Added missing [ComVisible] attribute.
878         * SynchronizationContext.cs: Added new (2.0 beta1) methods Copy and
879         WaitHelper. Added missing [ComVisible] and [ReliabilityContract] attrs.
880         * SynchronizationContextSwitcher.cs: Added missing [ComVisible] and 
881         [ReliabilityContract] attributes.
882
883 2004-08-08  Sebastien Pouliot  <sebastien@ximian.com>
884
885         * HostExecutionContext.cs: Fx 2.0 stub required for AppDomain.
886         * HostExecutionContextManager.cs: Fx 2.0 stub required for AppDomain.
887         * HostExecutionContextSwitcher.cs: Fx 2.0 stub required for AppDomain.
888
889 2004-08-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
890
891         * Timer.cs: don't invoke the callback if the period changes before the
892         due time. Fixes bug #62421.
893
894 2004-07-27  Lluis Sanchez Gual  <lluis@novell.com>
895
896         * ExecutionContext.cs, ExecutionContextSwitcher.cs, 
897           SynchronizationContext.cs, SynchronizationContextSwitcher.cs: Added
898           2.0 stubs.
899
900 2004-07-15  Dick Porter  <dick@ximian.com>
901
902         * Thread.cs: Hold a lock in GetNamedDataSlot.  Fixes bug 61582,
903         based on patch by Sbastien Robitaille
904         (sebastien.robitaille@croesus.com).  Also fix instances of
905         lock(typeof(Thread)) to lock a private object instead.
906
907 2004-07-14  Sebastien Pouliot  <sebastien@ximian.com>
908
909         * AsyncFlowControl.cs: New structure in Fx 2.0 required in 
910         System.Security namespace.
911         * CompressedStackSwitcher.cs: New structure in Fx 2.0 required in 
912         System.Security namespace.
913         * ContextCallback.cs: New delegate in Fx 2.0 required in 
914         System.Security namespace.
915         * CompressedStack.cs: Updated API for NET_2_0 profile.
916
917 2004-07-10  Lluis Sanchez Gual  <lluis@ximian.com>
918
919         * SendOrPostCallback.cs: New delegate.
920
921 2004-06-24  Dick Porter  <dick@ximian.com>
922
923         * Mutex.cs: Implement the createdNew parameter
924
925 2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
926
927         * Thread.cs: changed return type of VolatileRead to UIntPtr
928         * ThreadPool.cs: set return type of SetMinThreads to bool
929
930 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
931
932         * Thread.cs: Added new fields to keep sync with MonoThread.
933           Removed state changes in Sleep and Join. The state change is now done
934           in the icall. For accessing to internal fields lock with synch_lock
935           instead of this, which can be a source of deadlocks.
936
937 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
938
939         * Timer.cs: Don't abort the thread if Dispose() is called from the runner
940           thread.
941
942 2004-06-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
943
944         * Thread.cs:
945         (CurrentPrincipal): lock on CurrentThread, not typeof (Thread) and set
946         the thread IPrincipal if we get it from the AppDomain.
947
948 2004-06-09  Gert Driesen <drieseng@users.sourceforge.net>
949
950         * CompressedStack.cs: Added finalizer to match public API of
951         MS.NET
952
953 2004-05-19  Lluis Sanchez Gual <lluis@ximian.com>
954
955         * Thread.cs: Some fixes in Abort. Implemented Suspend and Resume.
956           Added internal interruption_requested field.
957
958 2004-05-13  Sebastien Pouliot  <sebastien@ximian.com>
959
960         * CompressedStack.cs: Added an internal constructor so a default one
961         doesn't appear with corcompare.
962         * Thread.cs: Added missing MemoryBarrier (only for 1.1) and SpinWait to please
963         corcompare. Both throw a NotImplementedException.
964         * ThreadPool.cs: Added missing UnsafeRegisterWaitForSingleObject methods (4
965         overloads) to please corcompare. All throw a NotImplementedException.
966
967 2004-05-12  Zoltan Varga  <vargaz@freemail.hu>
968
969         * CompressedStack.cs: New file.
970
971 2004-04-15  Lluis Sanchez Gual <lluis@ximian.com>
972
973         * ThreadPool.cs: Added GetMinThreads and SetMinThreads.
974         * Timer.cs: In Change, return false if the timer has been disposed.
975         In Dispose, notify the WaitHandle.
976
977 2004-04-11  Lluis Sanchez Gual <lluis@ximian.com>
978
979         * ReaderWriterLock.cs: More fixes: never wait where acquiring a reader lock
980           if the thread already has the lock. Added readyWaitingReaders variable to
981           keep track of threads ready to get the reader lock.
982
983 2004-04-11  Lluis Sanchez Gual <lluis@ximian.com>
984
985         * LockQueue.cs: Moved lockCount change inside the rwlock lock. Removed
986           lock(this) when entering the rwlock to avoid a deadlock.
987         * ReaderWriterLock.cs: In AcquireWriterLock, queue the thread if the queue
988           is not empty (even if state==0).
989
990 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
991
992         * Timer.cs: Call the callback immediately if dueTime is 0. Fixes
993         #56728.
994
995 2004-04-08  Jackson Harper  <jackson@ximian.com>
996
997         * ReaderWriterLock.cs: Fix tyop
998         
999 2004-04-08  Lluis Sanchez Gual <lluis@ximian.com>
1000
1001         * ReaderWriterLock.cs: Changed some methods to private.
1002         * WaitHandle.cs: In Wait methods, release the synchronization context when 
1003           exitContext is true.
1004
1005 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1006
1007         * Timer.cs: call Abort on the Runner instance too.
1008
1009 2004-04-07  Jackson Harper  <jackson@ximian.com>
1010
1011         * Thread.cs: Use new culture info method for constructing the
1012         current culture.
1013         
1014 2004-04-07  Lluis Sanchez Gual <lluis@ximian.com>
1015
1016         * ReaderWriterLock.cs: When a thread holds a writer lock, a call to
1017           AcquireReaderLock works like a call to AcquireWriterLock.
1018
1019 2004-04-06  Lluis Sanchez Gual <lluis@ximian.com>
1020
1021         * Monitor.cs: In Wait(), release the synchronization context when 
1022           exitContext is true.
1023
1024 2004-04-06  Lluis Sanchez Gual <lluis@ximian.com>
1025
1026         * LockCookie.cs: Keep in this class the count of reader or writer locks
1027           for a thread, not only whether it has locks or not.
1028         * LockQueue.cs: Added property for checking if a thread is waiting in
1029           the queue. Wait now returns a boolean that set to false on timeout 
1030           expiration.
1031         * ReaderWriterLock.cs: Started fixing bugs but I had to rewrite a lot of it.
1032           The main change is that now it keeps a reader lock count for each
1033           thread. This is needed since methods like ReleaseLock or 
1034           UpgradeToWriterLock need to return a per-thread status in LockCookie.
1035           Also added support for recursive writer-lock requests.
1036
1037 2004-03-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1038
1039         * ThreadAbortException.cs: use same HResult as MS.
1040         * Timer.cs: abort the running thread when disposing the Timer. This
1041         fixes NullRefs when finishing xsp.
1042
1043 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1044
1045         * NativeOverlapped.cs: added 2 new internal fields.
1046         * Overlapped.cs: implemented, but it's not used.
1047
1048         * ThreadPool.cs: implemented BindHandle.
1049
1050 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
1051
1052         * Timer.cs (Dispose): Applied patch from Jaroslaw Kowalski 
1053         (jaak@zd.com.pl). Fix finalization problems during appdomain unload.
1054
1055 2004-02-23  Jackson Harper <jackson@ximian.com>
1056
1057         * LockCookie.cs: Add some fields for restoring locks.
1058         * ReaderWriterLock.cs: Implement
1059         * LockQueue.cs: New File - used for queueing thread locks in
1060         ReaderWriterLock.
1061         
1062 2004-02-19  Jackson Harper <jackson@ximian.com>
1063
1064         * Monitor.cs: Fix spelleng.
1065         
1066 2004-02-09  Zoltan Varga  <vargaz@freemail.hu>
1067
1068         * Thread.cs: Add fields added to unmanaged MonoThread here as well.
1069         Fixes random errors caused by memory corruption.
1070
1071 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
1072
1073         * Thread.cs: Store the thread name in unmanaged memory, since the
1074         thread object is shared between appdomains.
1075
1076 2004-02-05  Sebastien Pouliot  <sebastien@ximian.com>
1077
1078         * Thread.cs: Implemented CurrentPrincipal.
1079
1080 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1081
1082         * Thread.cs: delayed thread creation until Start is called. If we
1083         don't do that and Start() is not called, the thread is leaked. First
1084         step towards fixing bug #53078. 
1085
1086 2003-12-02  Dick Porter  <dick@ximian.com>
1087
1088         * Thread.cs: Throw InvalidOperationException if Thread.Name is
1089         already set.
1090
1091 2003-12-01  Dick Porter  <dick@ximian.com>
1092
1093         * Thread.cs: Implement CurrentCulture and CurrentUICulture
1094
1095 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
1096
1097         * Thread.cs: Add new VolatileRead/VolatileWrite methods from 1.1
1098
1099 2003-10-23  Lluis Sanchez Gual  <lluis@ximian.com>
1100
1101         * Thread.cs: Added ResetDataStoreStatus and RestoreDataStoreStatus
1102           methods. They are used in CrossAppDomainChannel to save and restore
1103           thread's local data when switching between domains.
1104
1105 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1106
1107         * ManualResetEvent.cs: added check for disposed.
1108         * Thread.cs: no need to init this field.
1109
1110 2003-10-01  Zoltan Varga  <vargaz@freemail.hu>
1111
1112         * Thread.cs: Add locking to AllocateNamedDataSlot and 
1113         FreeNamedDataSlot.
1114
1115 Wed Aug 20 12:01:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
1116
1117         * Thread.cs: put all the fields at the start and add
1118         more fields needed by the runtime.
1119
1120 2003-08-14  Lluis Sanchez Gual  <lluis@ximian.com>
1121
1122         * Thread.cs: SetData() method: use Hashtable.Contains to check
1123           if a dataslot has been allocated (value could be null).
1124
1125 2003-07-23  Duncan Mak  <duncan@ximian.com>
1126
1127         * WaitHandle.cs (CheckDisposed): This method is not in the public
1128         API, mark it as 'internal'.
1129
1130 2003-07-01  Dick Porter  <dick@ximian.com>
1131
1132         * Thread.cs: Throw an exception if thread creation failed.
1133         (Better than just blowing up later.)
1134
1135 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
1136
1137         * ThreadPool.cs: use async delegate invoke.
1138
1139 2003-06-25  Dick Porter  <dick@ximian.com>
1140
1141         * WaitHandle.cs: Default handle value should be InvalidHandle, not
1142         Zero.
1143
1144 2003-06-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1145
1146         * ThreadPool.cs: correctly create a TimeSpan with provided the number of
1147         milliseconds.
1148
1149         * WaitHandle.cs: fixes for WaitAny/All and TimeSpan.
1150
1151 2003-06-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1152
1153         * WaitHandle.cs: checks and exceptions.
1154
1155 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1156
1157         * NativeEventCalls.cs: added CloseEvent_intenal.
1158         * WaitHandle.cs: call CloseEvent_internal when disposing.
1159
1160 2003-05-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1161
1162         * RegisteredWaitHandle.cs: check that the callback is not null before
1163         invoking.
1164
1165         * ThreadPool.cs: fixed timeout -> TimeSpan conversions (closes bug
1166         #43963). Queue the item before setting the handle. If there's a timeout,
1167         avoid trying to Dequeue, getting the exception et al, just continue the
1168         loop.
1169
1170 Mon May 19 09:07:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
1171
1172         * Monitor.cs: removed test_owner, the check is already done in the
1173         icall.
1174
1175 Tue May 13 15:34:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
1176
1177         * Thread.cs: added missing field used by the runtime and
1178         a new field to support thread-static data.
1179
1180 2003-04-17  Pedro Mart?ez Juli? <yoros@wanadoo.es>
1181
1182         * Timer.cs: Change the position of two lines because they were
1183         before the "if" that ensures the integrity. After this, the first of
1184         that two lines was producing a NullReferenceException.
1185
1186 2003-04-09  Dick Porter  <dick@ximian.com>
1187
1188         * Thread.cs: Make sure a reference to the ThreadStart delegate is
1189         held.  There's no telling how long it will be before
1190         Thread.Start() is called, and GC might destroy the delegate.
1191         Thread() and Start() need to be rewritten so that the runtime
1192         creates the new thread when Start() is called, which will simplify
1193         the code a great deal.
1194
1195 2003-03-20  Miguel de Icaza  <miguel@ximian.com>
1196
1197         * Thread.cs (CurrentCuluture): use the invaraint culture instead
1198         of "" for the current_culture setting.
1199
1200 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
1201
1202         * Thread.cs: Fix visibility of ResetAbort().
1203
1204 2003-03-18  Dick Porter  <dick@ximian.com>
1205
1206         * Thread.cs: Keep the thread state updated in all the places that
1207         require it.  (Suspend, Resume and Interrupt not handled yet)
1208
1209 2003-03-03  Lluis Sanchez Gual <lluis@ideary.com>
1210
1211         * Thread.cs: Changed implementation of CurrentContext, adapted to the changes
1212           in the runtime.
1213
1214 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1215
1216         * Thread.cs: implemented CurrentContext.
1217
1218 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1219
1220         * Thread.cs: made the thread_id for the current thread accesible through
1221         an internal property.  
1222
1223 2003-02-17  Dick Porter  <dick@ximian.com>
1224
1225         * Thread.cs: Added the Start semaphore field to the class.  Update
1226         the thread state after Start() has returned, not before.
1227
1228 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
1229
1230         * Thread.cs (Sleep): Timeout.Infinite is a value argument.
1231
1232 2003-02-11  Dick Porter  <dick@ximian.com>
1233
1234         * Monitor.cs: Infinite wait is Infinite, not 0 ms
1235
1236 2003-02-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1237
1238         * Thread.cs: fixed bug #37759.
1239
1240 2003-02-07  Patrik Torstensson
1241
1242         * Timer.cs: Set the Background thread flag for the timer thread
1243
1244 2003-02-05  Patrik Torstensson
1245
1246         * ThreadPool.cs: Reformated and fixed issue that made all thread exit the pool. 
1247
1248 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
1249
1250         * ThreadPool.cs: Implemented RegisterWaitForSingleObject methods.
1251
1252 Tue Jan 28 17:55:59 CET 2003 Paolo Molaro <lupus@ximian.com>
1253
1254         * Thread.cs: delay-init datastorehash.
1255
1256 2003-01-10  Patrik Torstensson  <totte@race-x-change.com>
1257
1258         * ThreadPool.cs: Temporary removed the usage of monitor thread, implemented a 
1259                     model more equal to the MS one.
1260
1261 2002-12-10  Dick Porter  <dick@ximian.com>
1262
1263         * Monitor.cs:
1264         * Thread.cs:
1265         * ThreadPool.cs:
1266         * Timer.cs:
1267         * WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
1268         ms, not Milliseconds.
1269
1270 2002-12-07  Martin Baulig  <martin@ximian.com>
1271
1272         * Timer.cs: Make it actually work; now it no longer sets your
1273         application on fire if you use a zero periode and Timer.Change()
1274         actually works.
1275
1276 2002-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1277
1278         * Timer.cs: implemented more stuff. It works now.
1279
1280 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
1281
1282         * Thread.cs: Implement GetDomain() and GetDomainID().
1283
1284 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1285
1286         * ThreadPool.cs: now the monitor thread is not sleeping and checking if
1287         more worker threads needed. It waits on _DataInQueue. If (and only if)
1288         there's data in the queue it checks if more worker threads needed and
1289         then sleeps 0.5s before waiting for queued data again.
1290
1291 2002-09-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1292
1293         * ThreadPool.cs: set IsThreadPoolThread before starting the worker.
1294
1295 2002-09-11  Dick Porter  <dick@ximian.com>
1296
1297         * Mutex.cs: 
1298         * ManualResetEvent.cs: 
1299         * AutoResetEvent.cs: Use the WaitHandle.Handle property instead of
1300         the private field
1301
1302         * WaitHandle.cs: Hide the os_handle field and the WaitOne_internal
1303         method
1304
1305 2002-09-03  Dick Porter  <dick@ximian.com>
1306
1307         * Thread.cs: Added thread ID field
1308
1309 2002-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1310
1311         * WaitHandle.cs: IDisposable fixes.
1312
1313 2002-08-14  Dick Porter  <dick@ximian.com>
1314
1315         * Thread.cs: Make CurrentUICulture act the same as CurrentCulture
1316         for now.
1317
1318 2002-08-12  Dietmar Maurer  <dietmar@ximian.com>
1319
1320         * ThreadAbortException.cs: impl. ExceptionState property.
1321
1322         * Thread.cs: moved all instance variables to the start of the
1323         class. added support for Thread::Abort()
1324
1325 2002-04-30  Dick Porter  <dick@ximian.com>
1326
1327         * Thread.cs: If LocalDataStoreSlot already has data set, remove it
1328         before adding a new one.
1329
1330         Use the Thread object destructor to tell the runtime to close the
1331         thread handle.
1332
1333 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
1334
1335         * Interlocked.cs: made all methods icalls.
1336
1337 2002-04-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1338
1339         * IOCompletionCallback.cs: added attributes to the delegate
1340         (CLSCompliant(false) and Serializable).
1341
1342 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
1343         * Thread.cs: Fixed IsThreadPoolThread to use a internal property instead of extending 
1344                                  the threadstate enum.
1345         * ThreadPool.cs: Now using the internal Isthreadpoolthread property
1346         * ThreadState.cs: removed non-standard enum (ThreadPoolThread)
1347
1348 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
1349
1350         * ThreadState.cs: Added enum for threadpool thread
1351         * Thread.cs: changed the set/clr_state to be internal (used from threadpool)
1352         * Thread.cs: Added IsThreadPoolThread
1353         * ThreadPool.cs: Implementation of QueueUserWorkItem
1354
1355 Wed Feb 13 21:51:30 CET 2002 Paolo Molaro <lupus@ximian.com>
1356
1357         * Thread.cs: implement CurrentCulture property needed by
1358         Convert.ChangeType() (used when compiling enums).
1359
1360 2002-01-23  Dick Porter  <dick@ximian.com>
1361
1362         * ManualResetEvent.cs: 
1363         * AutoResetEvent.cs: Fixed DOS line endings
1364
1365 2002-01-22  Veronica De Santis <veron78@interfree.it>   
1366         
1367         * NativeEventCalls : Class that contains internal calls shared by Auto 
1368                              and Manual Reset Events
1369         * AutoResetEvents.cs : Added class AutoResetEvents and its implementation
1370         * ManualResetEvents.cs : Added class ManualResetEvents and its implementation
1371
1372 2002-01-16  Veronica De Santis <veron78@interfree.it>   
1373         
1374         * WaitHandle.cs : Renamed handle to os_handle and make it protected
1375                           instead of private.
1376         * Mutex.cs : Write the System.Threading.Mutex methods ( constructors 
1377                      and the ReleaseMutex)
1378
1379 2002-01-15  Dick Porter  <dick@ximian.com>
1380
1381         * WaitHandle.cs:
1382         * Thread.cs: Make the runtime's idea of infinite timeouts coincide
1383         with the class library's
1384
1385 2002-01-10  Dick Porter  <dick@ximian.com>
1386
1387         * WaitHandle.cs: Added checks for too many handles and null
1388         handles in WaitAll() and WaitAny
1389         
1390
1391 2002-01-05  Ravi Pratap  <ravi@ximian.com>
1392
1393         * AutoResetEvent.cs, ManualResetEvent.cs, Monitor.cs : MonoTODO
1394         decoration.
1395
1396         * Mutex.cs, Overlapped.cs, ReaderWriterLock.cs, RegisteredWaitHandle.cs,
1397         Thread.cs, ThreadAbortException.cs, ThreadPool.cs, Timer.cs, WaitHandler.cs : Ditto.
1398
1399 2001-12-11  Dick Porter  <dick@ximian.com>
1400
1401         * WaitHandle.cs: Implemented WaitAll(), WaitAny() and WaitOne() as
1402         internal calls.
1403
1404 2001-11-26  Dick Porter  <dick@ximian.com>
1405
1406         * Thread.cs: DataSlot uses a single system TLS slot, and a
1407         hashtable per thread.  Some minor changes to reflect the new
1408         internal calls using the new IO library, and the newly-supported
1409         bool returns from internal calls.
1410
1411         * Monitor.cs: Use bool returns from internal calls now they are
1412         supported by the runtime.  Coalesce enter with the try_enter
1413         internal call.
1414
1415 Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <lupus@ximian.com>
1416
1417         * Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.
1418
1419 2001-10-03  Dick Porter  <dick@ximian.com>
1420
1421         * Monitor.cs: Implemented all methods except the two Wait()
1422         methods that take boolean parameters
1423
1424 2001-09-28  Dick Porter  <dick@ximian.com>
1425
1426         * Thread.cs: Implemented AllocateDataSlot(),
1427         AllocateNamedDataSlot(), FreeNamedDataSlot(), GetData(),
1428         GetNamedDataSlot(), SetData(), IsBackground.  Reworked Thread()
1429         and Start() to avoid a race condition. Added thread-safe state
1430         changing private operations.
1431
1432         * Monitor.cs: Comment out the GetType() calls because it isn't implemented yet
1433
1434 2001-09-25  Dick Porter  <dick@ximian.com>
1435
1436         * Thread.cs: Implement Join and timed Join, set correct state
1437         around Start, Join and Sleep calls, implement IsAlive and
1438         ThreadState properties.
1439
1440         * ThreadState.cs (Threading): Added StopRequested,
1441         SuspendRequested, Suspended values
1442
1443 2001-09-23  Dick Porter  <dick@ximian.com>
1444
1445         * Thread.cs: Implemented CurrentThread and Sleep (both versions)
1446         with internal calls, and Name.
1447
1448 2001-09-21  Dick Porter  <dick@ximian.com>
1449
1450         * Thread.cs: Implement Thread(ThreadStart) constructor and Start()
1451         with an internal call
1452
1453         * WaitHandle.cs: Close calls Dispose(false)
1454
1455 2001-09-13  Dick Porter  <dick@ximian.com>
1456
1457         * ApartmentState.cs (Threading): Set the correct enum values
1458
1459 2001-09-13  Dick Porter  <dick@ximian.com>
1460
1461         * ApartmentState.cs, AutoResetEvent.cs, IOCompletionCallback.cs,
1462         Interlocked.cs, LockCookie.cs, ManualResetEvent.cs, Monitor.cs,
1463         Mutex.cs, NativeOverlapped.cs, Overlapped.cs, ReaderWriterLock.cs,
1464         RegisteredWaitHandle.cs, SynchronizationLockException.cs,
1465         Thread.cs, ThreadAbortException.cs, ThreadInterruptedException.cs,
1466         ThreadPool.cs, ThreadStart.cs, ThreadStateException.cs,
1467         Timeout.cs, Timer.cs, TimerCallback.cs, WaitCallback.cs,
1468         WaitHandle.cs, WaitOrTimerCallback.cs: System.Threading class
1469         stubs.
1470         
1471 2001-07-18  Michael Lambert <michaellambert@email.com>
1472
1473         * ThreadPriority.cs, ThreadState.cs: Add.