New test.
[mono.git] / mcs / class / corlib / System.Threading / ChangeLog
1 2006-07-04  Atsushi Enomoto  <atsushi@ximian.com>
2
3         * WaitHandle.cs : CheckArray() is also used in WaitAny(), so added
4           extra argument to skip STAThread check.
5
6 2006-06-30  Duncan Mak  <duncan@novell.com>
7
8         * WaitHandle.cs (CheckArray): Avoid using reflection unless we
9         really need to.
10
11 2006-06-29  Duncan Mak  <duncan@novell.com>
12
13         * WaitHandle.cs (CheckArray): Throw NotSupportedException if the
14         current thread is marked with the STAThreadAttribute. Fixes bug
15         #78455.
16
17 2006-05-05  Sebastien Pouliot  <sebastien@ximian.com>
18
19         * ExecutionContext.cs: Don't capture the compressed stack unless the 
20         security manager is active (this wasn't ready to be called in 
21         production code).
22
23 2004-04-29  Atsushi Enomoto  <atsushi@ximian.com>
24
25         * Timer.cs : avoid NullReferenceException when it is already disposed.
26           Patch by pawel.sakowski@mind-breeze.com. Fixed bug #78208.
27
28 2004-04-28  Atsushi Enomoto  <atsushi@ximian.com>
29
30         * SynchronizationContext.cs : use ThreadPool in Post(), as suggested
31           by cl (bug #78139).
32
33 2004-04-04  Atsushi Enomoto  <atsushi@ximian.com>
34
35         * Thread.cs : base class is CriticalFinalizerObject.
36         * ThreadStartException.cs : no public constructors.
37
38 Wed Mar 29 18:29:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
39
40         * Thread.cs: update for the runtime changes to culture caching.
41
42 Wed Mar 15 16:35:49 CET 2006 Paolo Molaro <lupus@ximian.com>
43
44         * Thread.cs: updates for LocalDataStoreSlot: we use an array as
45         storage for the slots now so that LocalDataStoreSlot objects an be
46         garbage collected if the user doesn't keep a reference to them.
47
48 2006-02-09  Miguel de Icaza  <miguel@novell.com>
49
50         * Monitor.cs: Patch from Thong Nguyen, Wait (.., Timeout) method
51         should allow a -1 (Timeout.Infinite) to mean indefinite wait (the
52         code already supported this.
53
54         Removed also a LAMESPEC for missing argument checking in Wait with
55         the int argument.
56         
57         Fixed the use of exceptions.
58
59 2005-12-23  Dick Porter  <dick@ximian.com>
60
61         * EventWaitHandle.cs: 
62         * Mutex.cs: Implement OpenExisting
63
64         * NativeEventCalls.cs: Add OpenEvent icall for OpenExisting in
65         2.0.  Add a "created" boolean out parameter to CreateEvent icall.
66
67         * ManualResetEvent.cs: 
68         * AutoResetEvent.cs: Update CreateEvent icall signature (now has
69         "created" boolean out parameter.)
70
71 2005-12-17  Dick Porter  <dick@ximian.com>
72
73         * ThreadStartException.cs: 
74         * EventWaitHandle.cs: 
75         * EventResetMode.cs: 
76         * AbandonedMutexException.cs: New for 2.0 profile
77
78         * ThreadState.cs: 
79         * Interlocked.cs: 
80         * RegisteredWaitHandle.cs: 
81         * Monitor.cs: 
82         * ThreadPriority.cs: 
83         * Mutex.cs: 
84         * ManualResetEvent.cs: 
85         * AutoResetEvent.cs: Updated for 2.0 profile
86
87 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
88
89         * Interlocked.cs: Add T:class constraint to the generic 
90         CompareExchange and Exchange methods.
91
92 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
93
94         * Interlocked.cs: Add generic CompareExchange and Exchange methods.
95
96 2005-11-17  Sebastien Pouliot  <sebastien@ximian.com>
97
98         * WaitHandleCannotBeOpenedException.cs: New (2.0). Is required to 
99         compile the Semaphore tests (in System.dll).
100
101 2005-10-23  Marek Safar  <marek.safar@seznam.cz>
102
103         * SynchronizationContext.cs: A few simple fixes.
104
105 2005-10-06  Sebastien Pouliot  <sebastien@ximian.com>
106  
107         * Thread.cs: Copy an existing IPrincipal to new threads. Fix bug 
108         #76332.
109
110 2005-10-06  Sebastien Pouliot  <sebastien@ximian.com> 
111
112         * Thread.cs: Added new attributes, [ReliabilityContract] for 
113         destructor and [Obsolete] for [Get|Set]CompressedStack, that were 
114         added in 2.0 RC.
115
116 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
117
118         * Thread.cs (MemoryBarrier): Make this an icall.
119
120 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
121
122         * Thread.cs (Interrupt): Make this throw a NotImplementedException.
123
124 2005-09-09  Martin Baulig  <martin@ximian.com>
125
126         * Timer.cs (Timer.Runner.Start): Silently catch
127         ObjectDisposedException and return; works around some race
128         condition on thread abort.      
129
130 2005-08-19  Dick Porter  <dick@ximian.com>
131
132         * Thread.cs: Reserve 64 bits for the thread ID.
133
134 2005-07-19  Martin Baulig  <martin@ximian.com>
135
136         * Timer.cs (Timer.Runner.Start): Fix a race condition which was
137         causing a hang on exit int he debugger: check `!disposed' before
138         `start_event.WaitOne ()' and again after it.
139
140 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
141
142         * Thread.cs: check that the culture is valid for formatting
143         (ie, (!neutral || invariant)).
144
145 2005-06-07  Sebastien Pouliot  <sebastien@ximian.com> 
146
147         * Thread.cs: Added _Thread interface (and members) and a few missing
148         attributes (for both 1.1 and 2.0).
149
150 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
151
152         * Thread.cs Mutex.cs Monitor.cs: Add some missing 2.0 attributes.
153
154 2005-05-29  Sebastien Pouliot  <sebastien@ximian.com> 
155
156         * Timer.cs: Added new constructor for 2.0 and ComVisible attribute.
157         * Timeout.cs: This is a static class in 2.0 and ComVisible attribute.
158
159 2005-05-26  Ben Maurer  <bmaurer@ximian.com>
160
161         * Thread.cs: Use a static object for a lock rather than
162         typeof(Thread).
163
164 2005-05-26  Sebastien Pouliot  <sebastien@ximian.com> 
165  
166         * SynchronizationContext.cs: Re-introduced SendOrPost method as it's 
167         being used in System.Web.Services.
168
169 2005-05-26  Sebastien Pouliot  <sebastien@ximian.com>
170
171         * SynchronizationContext.cs: Updated to beta2 API so it doesn't depend
172         on the switcher structure anymore (which will be removed from the 
173         build).
174
175 2005-05-24  Sebastien Pouliot  <sebastien@ximian.com>
176
177         * Thread.cs: Removed #pragma which aren't supported by CSC 7.x.
178
179 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
180
181         * AsyncFlowControl.cs: Now available, as internal, in NET_1_1. This is
182         required to get some methods from SecurityContext and ExecutionContext
183         working.
184         * CompressedStack.cs: Now includes the current CompressedStack in a new
185         Capture.
186         * ExecutionContext.cs: Includes more methods in NET_1_1 to enable 
187         ThreadPool.UnsafeQueueUserWorkItem to work properly (i.e. without
188         stack propagation).
189         * Thread.cs: Made ExecutionContext field accessible from the runtime.
190         Added stack propagation when Thread.Start is called.
191         * ThreadPool.cs: QueueUserWorkItem now does stack propagation (done in
192         the runtime), so I "fixed" UnsafeQueueUserWorkItem not to do so.
193
194 2005-05-19  Miguel de Icaza  <miguel@novell.com>
195
196         * Thread.cs: REmove warnings.
197
198 2005-05-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
199
200         * Thread.cs: first check for null, then set in_currentculture.
201
202 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
203
204         * Thread.cs: Moved all checks done inside sync_lock to unmanaged code.
205         Merged Thread_internal and Start_internal into a single icall, which
206         does all work.
207
208 2005-05-11  Sebastien Pouliot  <sebastien@ximian.com> 
209
210         * CompressedStack.cs: Allow merging of an existing CompressedStack
211         with the actual stack of the current Thread.
212         * Thread.cs: GetCompressedStack and SetCompressedStack are public 
213         before 2.0 but couldn't be seen with mono-api-info because of it's 
214         LinkDemand for the ECMA public key. Removed unused CompressedStack
215         private field (now part of the ExecutionContext).
216
217 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com> 
218
219         * CompressedStack.cs: GetCompressedStack is public before 2.0 but 
220         couldn't be seen with mono-api-info because of it's LinkDemand for
221         the ECMA public key. Stack capture occurs here if none exists on the
222         current thread.
223
224 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
225
226         * ReaderWriterLock.cs: fix random ApplicationException errors. Tested
227         with the System.Web.Cache stress program. Patch by Eyal Alayuf
228         (Mainsoft). Fixes 74598.
229
230 2005-04-28  Sebastien Pouliot  <sebastien@ximian.com>
231
232         * Thread.cs: Added property to get the ExecutionContext in 2.0. Fixed
233         GetCompressedStack and made SetCompressedStack available (as internal)
234         before NET_2_0.
235
236 2005-04-28  Sebastien Pouliot  <sebastien@ximian.com> 
237  
238         * AsyncFlowControl.cs: Updated wrt beta2.
239         * ExecutionContext.cs: Updated wrt beta2. Class is now internal in 
240         NET_1_1 to allow the compressed stack propagation to other threads.
241         * CompressedStack.cs: Updated wrt beta2. Class is internal in NET_1_1 
242         to allow the compressed stack propagation to other threads.
243         * ContextCallback.cs: Updated wrt beta2.
244         * HostExecutionContext.cs: Updated wrt beta2.
245         * HostExecutionContextManager.cs: Updated wrt beta2.
246         * Thread.cs: Added internal property to get the ExecutionContext.
247
248 2005-04-19  Zoltan Varga  <vargaz@freemail.hu>
249
250         * Thread.cs: Add some unused fields.
251
252 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
253
254         * ThreadPool.cs: BindHandle does nothing now.
255
256 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
257
258         * Thread.cs: clear the Unstarted bit before calling Start_internal.
259         Fixes bug #72738.
260
261 2005-04-04  Ben Maurer  <bmaurer@ximian.com>
262
263         * Thread.cs: Do argument checking for Current[UI]Culture to make
264         the exception more clear for a null value being set.
265
266 2005-03-24  Sebastien Pouliot  <sebastien@ximian.com>
267
268         * CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA 
269         public key on GetCompressedStack method.
270         * Mutex: Added LinkDemand for UnmanagedCode to create named (system 
271         wide) mutexes.
272         * Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
273         CompressedStack methods.
274         * WaitHandle.cs: Added LinkDemand and InheritanceDemand for 
275         UnmanagedCode on set Handle property.
276
277 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
278
279         * Thread.cs: Make slothash a ThreadStatic field. Fixes #65414.
280
281 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
282
283         * Monitor.cs Interlocked.cs: Add net 2.0 ReliabilityContractAttributes.
284
285 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
286
287         * Interlocked.cs: Applied patch from Luca Barbieri (luca.barbieri@gmail.com). Add NET 2.0 methods.
288
289 Tue Feb 15 18:19:11 CET 2005 Paolo Molaro <lupus@ximian.com>
290
291         * Thread.cs: make the slothash a field in MonoThread.
292
293 2005-01-27  Sebastien Pouliot  <sebastien@ximian.com>
294
295         * Overlapped.cs: Added check for ControlPolicy and ControlEvidence for
296         Unsafe pack. Added MonoTODO for missing security stack propagation.
297         * Thread.cs: Add security checks for ControlThread.
298         * ThreadPool.cs: Added declarative security checks.
299
300 Thu Jan 13 18:15:32 CET 2005 Paolo Molaro <lupus@ximian.com>
301
302         * Thread.cs: implement stacksize and parameterized
303         start functionality (requires matching runtime).
304
305 2005-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
306
307         * ThreadAbortException.cs: added private serialization .ctor.
308
309 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
310
311         * CompressedStack.cs: Implemented most todo so it's usable for CAS.
312         * CompressedStackSwitcher.cs: Implemented most todo.
313         * Thread.cs: Implement support for getting/setting CompressedStack.
314
315 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
316
317         * Thread.cs: Change type of culture_info and ui_culture_info to 
318         IntPtr. Implement correct culture handling for the UI culture as
319         well.
320
321 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
322
323         * Thread.cs: Optimize CurrentCulture to avoid initializing the
324         serialization infrastructure in the common case when the culture is
325         not set explicitly.
326
327 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
328
329         * Thread.cs: Add new fields 'serialized_culture_info{_len}'.
330         
331         * Thread.cs (CurrentCulture): Fix leaking of culture info objects 
332         across appdomains. Partially fixes #50049.
333
334 2004-12-05  Miguel de Icaza  <miguel@ximian.com>
335
336         * AutoResetEvent.cs (Set, Reset): If we are disposed, throw a
337         ObjectDisposedEvent, helped track the WebConnection destructor
338         issue. 
339
340 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
341
342         * Timer.cs: don't invoke the callback twice when the timer changes.
343         Fixes bug #66116.
344
345 2004-09-08  Marek Safar  <marek.safar@seznam.cz>
346
347         * Interlocked.cs: Class is static in NET_2_0.
348
349 2004-09-04  Sebastien Pouliot  <sebastien@ximian.com>
350
351         * Thread.cs: Changed an imperative security demand to declarative
352         (unsupported) so it doesn't (for now) call the security runtime.
353
354 2004-08-20  Sebastien Pouliot  <sebastien@ximian.com>
355
356         * Thread.cs: Added Fx 2.0 properties/methods/attributes.
357
358 2004-08-12  Sebastien Pouliot  <sebastien@ximian.com>
359
360         * CompressedStackSwitcher.cs: Added missing [ComVisible] and 
361         [ReliabilityContract] attributes.
362         * ExecutionContext.cs: Added missing [ComVisible] and 
363         [Serializable] attributes.
364         * HostExecutionContext.cs: Added missing [ComVisible] attribute.
365         * HostExecutionContextManager.cs: Added missing [ComVisible] and 
366         [ReliabilityContract] attributes.
367         * HostExecutionContextSwitcher.cs: Added missing Equals and 
368         GetHashCode methods and [ComVisible] and [ReliabilityContract] attrs.
369         * ParameterizedThreadStart.cs: New delegate in NET_2_0.
370         * SendOrPostCallback.cs: Added missing [ComVisible] attribute.
371         * SynchronizationContext.cs: Added new (2.0 beta1) methods Copy and
372         WaitHelper. Added missing [ComVisible] and [ReliabilityContract] attrs.
373         * SynchronizationContextSwitcher.cs: Added missing [ComVisible] and 
374         [ReliabilityContract] attributes.
375
376 2004-08-08  Sebastien Pouliot  <sebastien@ximian.com>
377
378         * HostExecutionContext.cs: Fx 2.0 stub required for AppDomain.
379         * HostExecutionContextManager.cs: Fx 2.0 stub required for AppDomain.
380         * HostExecutionContextSwitcher.cs: Fx 2.0 stub required for AppDomain.
381
382 2004-08-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
383
384         * Timer.cs: don't invoke the callback if the period changes before the
385         due time. Fixes bug #62421.
386
387 2004-07-27  Lluis Sanchez Gual  <lluis@novell.com>
388
389         * ExecutionContext.cs, ExecutionContextSwitcher.cs, 
390           SynchronizationContext.cs, SynchronizationContextSwitcher.cs: Added
391           2.0 stubs.
392
393 2004-07-15  Dick Porter  <dick@ximian.com>
394
395         * Thread.cs: Hold a lock in GetNamedDataSlot.  Fixes bug 61582,
396         based on patch by Sbastien Robitaille
397         (sebastien.robitaille@croesus.com).  Also fix instances of
398         lock(typeof(Thread)) to lock a private object instead.
399
400 2004-07-14  Sebastien Pouliot  <sebastien@ximian.com>
401
402         * AsyncFlowControl.cs: New structure in Fx 2.0 required in 
403         System.Security namespace.
404         * CompressedStackSwitcher.cs: New structure in Fx 2.0 required in 
405         System.Security namespace.
406         * ContextCallback.cs: New delegate in Fx 2.0 required in 
407         System.Security namespace.
408         * CompressedStack.cs: Updated API for NET_2_0 profile.
409
410 2004-07-10  Lluis Sanchez Gual  <lluis@ximian.com>
411
412         * SendOrPostCallback.cs: New delegate.
413
414 2004-06-24  Dick Porter  <dick@ximian.com>
415
416         * Mutex.cs: Implement the createdNew parameter
417
418 2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
419
420         * Thread.cs: changed return type of VolatileRead to UIntPtr
421         * ThreadPool.cs: set return type of SetMinThreads to bool
422
423 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
424
425         * Thread.cs: Added new fields to keep sync with MonoThread.
426           Removed state changes in Sleep and Join. The state change is now done
427           in the icall. For accessing to internal fields lock with synch_lock
428           instead of this, which can be a source of deadlocks.
429
430 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
431
432         * Timer.cs: Don't abort the thread if Dispose() is called from the runner
433           thread.
434
435 2004-06-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
436
437         * Thread.cs:
438         (CurrentPrincipal): lock on CurrentThread, not typeof (Thread) and set
439         the thread IPrincipal if we get it from the AppDomain.
440
441 2004-06-09  Gert Driesen <drieseng@users.sourceforge.net>
442
443         * CompressedStack.cs: Added finalizer to match public API of
444         MS.NET
445
446 2004-05-19  Lluis Sanchez Gual <lluis@ximian.com>
447
448         * Thread.cs: Some fixes in Abort. Implemented Suspend and Resume.
449           Added internal interruption_requested field.
450
451 2004-05-13  Sebastien Pouliot  <sebastien@ximian.com>
452
453         * CompressedStack.cs: Added an internal constructor so a default one
454         doesn't appear with corcompare.
455         * Thread.cs: Added missing MemoryBarrier (only for 1.1) and SpinWait to please
456         corcompare. Both throw a NotImplementedException.
457         * ThreadPool.cs: Added missing UnsafeRegisterWaitForSingleObject methods (4
458         overloads) to please corcompare. All throw a NotImplementedException.
459
460 2004-05-12  Zoltan Varga  <vargaz@freemail.hu>
461
462         * CompressedStack.cs: New file.
463
464 2004-04-15  Lluis Sanchez Gual <lluis@ximian.com>
465
466         * ThreadPool.cs: Added GetMinThreads and SetMinThreads.
467         * Timer.cs: In Change, return false if the timer has been disposed.
468         In Dispose, notify the WaitHandle.
469
470 2004-04-11  Lluis Sanchez Gual <lluis@ximian.com>
471
472         * ReaderWriterLock.cs: More fixes: never wait where acquiring a reader lock
473           if the thread already has the lock. Added readyWaitingReaders variable to
474           keep track of threads ready to get the reader lock.
475
476 2004-04-11  Lluis Sanchez Gual <lluis@ximian.com>
477
478         * LockQueue.cs: Moved lockCount change inside the rwlock lock. Removed
479           lock(this) when entering the rwlock to avoid a deadlock.
480         * ReaderWriterLock.cs: In AcquireWriterLock, queue the thread if the queue
481           is not empty (even if state==0).
482
483 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
484
485         * Timer.cs: Call the callback immediately if dueTime is 0. Fixes
486         #56728.
487
488 2004-04-08  Jackson Harper  <jackson@ximian.com>
489
490         * ReaderWriterLock.cs: Fix tyop
491         
492 2004-04-08  Lluis Sanchez Gual <lluis@ximian.com>
493
494         * ReaderWriterLock.cs: Changed some methods to private.
495         * WaitHandle.cs: In Wait methods, release the synchronization context when 
496           exitContext is true.
497
498 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
499
500         * Timer.cs: call Abort on the Runner instance too.
501
502 2004-04-07  Jackson Harper  <jackson@ximian.com>
503
504         * Thread.cs: Use new culture info method for constructing the
505         current culture.
506         
507 2004-04-07  Lluis Sanchez Gual <lluis@ximian.com>
508
509         * ReaderWriterLock.cs: When a thread holds a writer lock, a call to
510           AcquireReaderLock works like a call to AcquireWriterLock.
511
512 2004-04-06  Lluis Sanchez Gual <lluis@ximian.com>
513
514         * Monitor.cs: In Wait(), release the synchronization context when 
515           exitContext is true.
516
517 2004-04-06  Lluis Sanchez Gual <lluis@ximian.com>
518
519         * LockCookie.cs: Keep in this class the count of reader or writer locks
520           for a thread, not only whether it has locks or not.
521         * LockQueue.cs: Added property for checking if a thread is waiting in
522           the queue. Wait now returns a boolean that set to false on timeout 
523           expiration.
524         * ReaderWriterLock.cs: Started fixing bugs but I had to rewrite a lot of it.
525           The main change is that now it keeps a reader lock count for each
526           thread. This is needed since methods like ReleaseLock or 
527           UpgradeToWriterLock need to return a per-thread status in LockCookie.
528           Also added support for recursive writer-lock requests.
529
530 2004-03-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
531
532         * ThreadAbortException.cs: use same HResult as MS.
533         * Timer.cs: abort the running thread when disposing the Timer. This
534         fixes NullRefs when finishing xsp.
535
536 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
537
538         * NativeOverlapped.cs: added 2 new internal fields.
539         * Overlapped.cs: implemented, but it's not used.
540
541         * ThreadPool.cs: implemented BindHandle.
542
543 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
544
545         * Timer.cs (Dispose): Applied patch from Jaroslaw Kowalski 
546         (jaak@zd.com.pl). Fix finalization problems during appdomain unload.
547
548 2004-02-23  Jackson Harper <jackson@ximian.com>
549
550         * LockCookie.cs: Add some fields for restoring locks.
551         * ReaderWriterLock.cs: Implement
552         * LockQueue.cs: New File - used for queueing thread locks in
553         ReaderWriterLock.
554         
555 2004-02-19  Jackson Harper <jackson@ximian.com>
556
557         * Monitor.cs: Fix spelleng.
558         
559 2004-02-09  Zoltan Varga  <vargaz@freemail.hu>
560
561         * Thread.cs: Add fields added to unmanaged MonoThread here as well.
562         Fixes random errors caused by memory corruption.
563
564 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
565
566         * Thread.cs: Store the thread name in unmanaged memory, since the
567         thread object is shared between appdomains.
568
569 2004-02-05  Sebastien Pouliot  <sebastien@ximian.com>
570
571         * Thread.cs: Implemented CurrentPrincipal.
572
573 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
574
575         * Thread.cs: delayed thread creation until Start is called. If we
576         don't do that and Start() is not called, the thread is leaked. First
577         step towards fixing bug #53078. 
578
579 2003-12-02  Dick Porter  <dick@ximian.com>
580
581         * Thread.cs: Throw InvalidOperationException if Thread.Name is
582         already set.
583
584 2003-12-01  Dick Porter  <dick@ximian.com>
585
586         * Thread.cs: Implement CurrentCulture and CurrentUICulture
587
588 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
589
590         * Thread.cs: Add new VolatileRead/VolatileWrite methods from 1.1
591
592 2003-10-23  Lluis Sanchez Gual  <lluis@ximian.com>
593
594         * Thread.cs: Added ResetDataStoreStatus and RestoreDataStoreStatus
595           methods. They are used in CrossAppDomainChannel to save and restore
596           thread's local data when switching between domains.
597
598 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
599
600         * ManualResetEvent.cs: added check for disposed.
601         * Thread.cs: no need to init this field.
602
603 2003-10-01  Zoltan Varga  <vargaz@freemail.hu>
604
605         * Thread.cs: Add locking to AllocateNamedDataSlot and 
606         FreeNamedDataSlot.
607
608 Wed Aug 20 12:01:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
609
610         * Thread.cs: put all the fields at the start and add
611         more fields needed by the runtime.
612
613 2003-08-14  Lluis Sanchez Gual  <lluis@ximian.com>
614
615         * Thread.cs: SetData() method: use Hashtable.Contains to check
616           if a dataslot has been allocated (value could be null).
617
618 2003-07-23  Duncan Mak  <duncan@ximian.com>
619
620         * WaitHandle.cs (CheckDisposed): This method is not in the public
621         API, mark it as 'internal'.
622
623 2003-07-01  Dick Porter  <dick@ximian.com>
624
625         * Thread.cs: Throw an exception if thread creation failed.
626         (Better than just blowing up later.)
627
628 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
629
630         * ThreadPool.cs: use async delegate invoke.
631
632 2003-06-25  Dick Porter  <dick@ximian.com>
633
634         * WaitHandle.cs: Default handle value should be InvalidHandle, not
635         Zero.
636
637 2003-06-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
638
639         * ThreadPool.cs: correctly create a TimeSpan with provided the number of
640         milliseconds.
641
642         * WaitHandle.cs: fixes for WaitAny/All and TimeSpan.
643
644 2003-06-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
645
646         * WaitHandle.cs: checks and exceptions.
647
648 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
649
650         * NativeEventCalls.cs: added CloseEvent_intenal.
651         * WaitHandle.cs: call CloseEvent_internal when disposing.
652
653 2003-05-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
654
655         * RegisteredWaitHandle.cs: check that the callback is not null before
656         invoking.
657
658         * ThreadPool.cs: fixed timeout -> TimeSpan conversions (closes bug
659         #43963). Queue the item before setting the handle. If there's a timeout,
660         avoid trying to Dequeue, getting the exception et al, just continue the
661         loop.
662
663 Mon May 19 09:07:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
664
665         * Monitor.cs: removed test_owner, the check is already done in the
666         icall.
667
668 Tue May 13 15:34:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
669
670         * Thread.cs: added missing field used by the runtime and
671         a new field to support thread-static data.
672
673 2003-04-17  Pedro Mart?ez Juli? <yoros@wanadoo.es>
674
675         * Timer.cs: Change the position of two lines because they were
676         before the "if" that ensures the integrity. After this, the first of
677         that two lines was producing a NullReferenceException.
678
679 2003-04-09  Dick Porter  <dick@ximian.com>
680
681         * Thread.cs: Make sure a reference to the ThreadStart delegate is
682         held.  There's no telling how long it will be before
683         Thread.Start() is called, and GC might destroy the delegate.
684         Thread() and Start() need to be rewritten so that the runtime
685         creates the new thread when Start() is called, which will simplify
686         the code a great deal.
687
688 2003-03-20  Miguel de Icaza  <miguel@ximian.com>
689
690         * Thread.cs (CurrentCuluture): use the invaraint culture instead
691         of "" for the current_culture setting.
692
693 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
694
695         * Thread.cs: Fix visibility of ResetAbort().
696
697 2003-03-18  Dick Porter  <dick@ximian.com>
698
699         * Thread.cs: Keep the thread state updated in all the places that
700         require it.  (Suspend, Resume and Interrupt not handled yet)
701
702 2003-03-03  Lluis Sanchez Gual <lluis@ideary.com>
703
704         * Thread.cs: Changed implementation of CurrentContext, adapted to the changes
705           in the runtime.
706
707 2003-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
708
709         * Thread.cs: implemented CurrentContext.
710
711 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
712
713         * Thread.cs: made the thread_id for the current thread accesible through
714         an internal property.  
715
716 2003-02-17  Dick Porter  <dick@ximian.com>
717
718         * Thread.cs: Added the Start semaphore field to the class.  Update
719         the thread state after Start() has returned, not before.
720
721 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
722
723         * Thread.cs (Sleep): Timeout.Infinite is a value argument.
724
725 2003-02-11  Dick Porter  <dick@ximian.com>
726
727         * Monitor.cs: Infinite wait is Infinite, not 0 ms
728
729 2003-02-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
730
731         * Thread.cs: fixed bug #37759.
732
733 2003-02-07  Patrik Torstensson
734
735         * Timer.cs: Set the Background thread flag for the timer thread
736
737 2003-02-05  Patrik Torstensson
738
739         * ThreadPool.cs: Reformated and fixed issue that made all thread exit the pool. 
740
741 2003-02-04  Lluis Sanchez Gual <lluis@ideary.com>
742
743         * ThreadPool.cs: Implemented RegisterWaitForSingleObject methods.
744
745 Tue Jan 28 17:55:59 CET 2003 Paolo Molaro <lupus@ximian.com>
746
747         * Thread.cs: delay-init datastorehash.
748
749 2003-01-10  Patrik Torstensson  <totte@race-x-change.com>
750
751         * ThreadPool.cs: Temporary removed the usage of monitor thread, implemented a 
752                     model more equal to the MS one.
753
754 2002-12-10  Dick Porter  <dick@ximian.com>
755
756         * Monitor.cs:
757         * Thread.cs:
758         * ThreadPool.cs:
759         * Timer.cs:
760         * WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
761         ms, not Milliseconds.
762
763 2002-12-07  Martin Baulig  <martin@ximian.com>
764
765         * Timer.cs: Make it actually work; now it no longer sets your
766         application on fire if you use a zero periode and Timer.Change()
767         actually works.
768
769 2002-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
770
771         * Timer.cs: implemented more stuff. It works now.
772
773 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
774
775         * Thread.cs: Implement GetDomain() and GetDomainID().
776
777 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
778
779         * ThreadPool.cs: now the monitor thread is not sleeping and checking if
780         more worker threads needed. It waits on _DataInQueue. If (and only if)
781         there's data in the queue it checks if more worker threads needed and
782         then sleeps 0.5s before waiting for queued data again.
783
784 2002-09-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
785
786         * ThreadPool.cs: set IsThreadPoolThread before starting the worker.
787
788 2002-09-11  Dick Porter  <dick@ximian.com>
789
790         * Mutex.cs: 
791         * ManualResetEvent.cs: 
792         * AutoResetEvent.cs: Use the WaitHandle.Handle property instead of
793         the private field
794
795         * WaitHandle.cs: Hide the os_handle field and the WaitOne_internal
796         method
797
798 2002-09-03  Dick Porter  <dick@ximian.com>
799
800         * Thread.cs: Added thread ID field
801
802 2002-08-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
803
804         * WaitHandle.cs: IDisposable fixes.
805
806 2002-08-14  Dick Porter  <dick@ximian.com>
807
808         * Thread.cs: Make CurrentUICulture act the same as CurrentCulture
809         for now.
810
811 2002-08-12  Dietmar Maurer  <dietmar@ximian.com>
812
813         * ThreadAbortException.cs: impl. ExceptionState property.
814
815         * Thread.cs: moved all instance variables to the start of the
816         class. added support for Thread::Abort()
817
818 2002-04-30  Dick Porter  <dick@ximian.com>
819
820         * Thread.cs: If LocalDataStoreSlot already has data set, remove it
821         before adding a new one.
822
823         Use the Thread object destructor to tell the runtime to close the
824         thread handle.
825
826 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
827
828         * Interlocked.cs: made all methods icalls.
829
830 2002-04-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
831
832         * IOCompletionCallback.cs: added attributes to the delegate
833         (CLSCompliant(false) and Serializable).
834
835 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
836         * Thread.cs: Fixed IsThreadPoolThread to use a internal property instead of extending 
837                                  the threadstate enum.
838         * ThreadPool.cs: Now using the internal Isthreadpoolthread property
839         * ThreadState.cs: removed non-standard enum (ThreadPoolThread)
840
841 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
842
843         * ThreadState.cs: Added enum for threadpool thread
844         * Thread.cs: changed the set/clr_state to be internal (used from threadpool)
845         * Thread.cs: Added IsThreadPoolThread
846         * ThreadPool.cs: Implementation of QueueUserWorkItem
847
848 Wed Feb 13 21:51:30 CET 2002 Paolo Molaro <lupus@ximian.com>
849
850         * Thread.cs: implement CurrentCulture property needed by
851         Convert.ChangeType() (used when compiling enums).
852
853 2002-01-23  Dick Porter  <dick@ximian.com>
854
855         * ManualResetEvent.cs: 
856         * AutoResetEvent.cs: Fixed DOS line endings
857
858 2002-01-22  Veronica De Santis <veron78@interfree.it>   
859         
860         * NativeEventCalls : Class that contains internal calls shared by Auto 
861                              and Manual Reset Events
862         * AutoResetEvents.cs : Added class AutoResetEvents and its implementation
863         * ManualResetEvents.cs : Added class ManualResetEvents and its implementation
864
865 2002-01-16  Veronica De Santis <veron78@interfree.it>   
866         
867         * WaitHandle.cs : Renamed handle to os_handle and make it protected
868                           instead of private.
869         * Mutex.cs : Write the System.Threading.Mutex methods ( constructors 
870                      and the ReleaseMutex)
871
872 2002-01-15  Dick Porter  <dick@ximian.com>
873
874         * WaitHandle.cs:
875         * Thread.cs: Make the runtime's idea of infinite timeouts coincide
876         with the class library's
877
878 2002-01-10  Dick Porter  <dick@ximian.com>
879
880         * WaitHandle.cs: Added checks for too many handles and null
881         handles in WaitAll() and WaitAny
882         
883
884 2002-01-05  Ravi Pratap  <ravi@ximian.com>
885
886         * AutoResetEvent.cs, ManualResetEvent.cs, Monitor.cs : MonoTODO
887         decoration.
888
889         * Mutex.cs, Overlapped.cs, ReaderWriterLock.cs, RegisteredWaitHandle.cs,
890         Thread.cs, ThreadAbortException.cs, ThreadPool.cs, Timer.cs, WaitHandler.cs : Ditto.
891
892 2001-12-11  Dick Porter  <dick@ximian.com>
893
894         * WaitHandle.cs: Implemented WaitAll(), WaitAny() and WaitOne() as
895         internal calls.
896
897 2001-11-26  Dick Porter  <dick@ximian.com>
898
899         * Thread.cs: DataSlot uses a single system TLS slot, and a
900         hashtable per thread.  Some minor changes to reflect the new
901         internal calls using the new IO library, and the newly-supported
902         bool returns from internal calls.
903
904         * Monitor.cs: Use bool returns from internal calls now they are
905         supported by the runtime.  Coalesce enter with the try_enter
906         internal call.
907
908 Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <lupus@ximian.com>
909
910         * Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.
911
912 2001-10-03  Dick Porter  <dick@ximian.com>
913
914         * Monitor.cs: Implemented all methods except the two Wait()
915         methods that take boolean parameters
916
917 2001-09-28  Dick Porter  <dick@ximian.com>
918
919         * Thread.cs: Implemented AllocateDataSlot(),
920         AllocateNamedDataSlot(), FreeNamedDataSlot(), GetData(),
921         GetNamedDataSlot(), SetData(), IsBackground.  Reworked Thread()
922         and Start() to avoid a race condition. Added thread-safe state
923         changing private operations.
924
925         * Monitor.cs: Comment out the GetType() calls because it isn't implemented yet
926
927 2001-09-25  Dick Porter  <dick@ximian.com>
928
929         * Thread.cs: Implement Join and timed Join, set correct state
930         around Start, Join and Sleep calls, implement IsAlive and
931         ThreadState properties.
932
933         * ThreadState.cs (Threading): Added StopRequested,
934         SuspendRequested, Suspended values
935
936 2001-09-23  Dick Porter  <dick@ximian.com>
937
938         * Thread.cs: Implemented CurrentThread and Sleep (both versions)
939         with internal calls, and Name.
940
941 2001-09-21  Dick Porter  <dick@ximian.com>
942
943         * Thread.cs: Implement Thread(ThreadStart) constructor and Start()
944         with an internal call
945
946         * WaitHandle.cs: Close calls Dispose(false)
947
948 2001-09-13  Dick Porter  <dick@ximian.com>
949
950         * ApartmentState.cs (Threading): Set the correct enum values
951
952 2001-09-13  Dick Porter  <dick@ximian.com>
953
954         * ApartmentState.cs, AutoResetEvent.cs, IOCompletionCallback.cs,
955         Interlocked.cs, LockCookie.cs, ManualResetEvent.cs, Monitor.cs,
956         Mutex.cs, NativeOverlapped.cs, Overlapped.cs, ReaderWriterLock.cs,
957         RegisteredWaitHandle.cs, SynchronizationLockException.cs,
958         Thread.cs, ThreadAbortException.cs, ThreadInterruptedException.cs,
959         ThreadPool.cs, ThreadStart.cs, ThreadStateException.cs,
960         Timeout.cs, Timer.cs, TimerCallback.cs, WaitCallback.cs,
961         WaitHandle.cs, WaitOrTimerCallback.cs: System.Threading class
962         stubs.
963         
964 2001-07-18  Michael Lambert <michaellambert@email.com>
965
966         * ThreadPriority.cs, ThreadState.cs: Add.