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