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