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