Commit Graph
236 Commits
Author SHA1 Message Date
Zoltan Varga 37ab41a282 2008-01-06 Zoltan Varga <[email protected]>
* Thread.cs (set_CurrentCulture): If the culture is read-only, cache the result
	of serializing it.
	(set_CurrentUICulture): Ditto.

svn path=/trunk/mcs/; revision=92335
2008-01-06 11:05:05 +00:00
Zoltan Varga a278bd3b4d 2008-01-03 Zoltan Varga <[email protected]>
* Thread.cs (set_CurrentCulture): Avoid the serialization overhead if
	the new culture is equal to the old one.

svn path=/trunk/mcs/; revision=92201
2008-01-03 19:05:50 +00:00
Zoltan Varga f42cbf51d2 2007-12-27 Zoltan Varga <[email protected]>
* Thread.cs: Change the type of synch_cs to an IntPtr to be in synch with the
	unmanaged definition.

svn path=/trunk/mcs/; revision=91908
2007-12-26 22:43:39 +00:00
Atsushi Eno 24f421a602 2007-11-20 Atsushi Enomoto <[email protected]>
* ReaderWriterLock.cs : ... and avoid extra finalizer call.


svn path=/trunk/mcs/; revision=89967
2007-11-20 09:02:15 +00:00
Atsushi Eno 9d02a54a8e 2007-11-20 Atsushi Enomoto <[email protected]>
* ReaderWriterLock.cs : adding missing 2.0 destructor (does nothing).


svn path=/trunk/mcs/; revision=89958
2007-11-20 02:36:53 +00:00
Paolo Molaro 10f5121f53 2007-09-14 Jb Evain <[email protected]>
* Makefile: force the use of the 2.0 mscorlib to compile
	the 2.1 mscorlib.dll.


svn path=/trunk/mcs/; revision=89215
2007-11-08 17:16:46 +00:00
Dick Porter 2b101808d8 2007-10-24 Dick Porter <[email protected]>
* Thread.cs: Call Thread_init on the new 2.0 constructors too.



svn path=/trunk/mcs/; revision=88120
2007-10-24 19:54:52 +00:00
Dick Porter eb888d87d3 2007-10-24 Dick Porter <[email protected]>
* Thread.cs: Assign the ManagedThreadId when it is asked for,
	rather than in the constructor, so ThreadPool threads also work.
	Fixes bug 335579 (and doesn't break 325367 or 325566)



svn path=/trunk/mcs/; revision=88077
2007-10-24 15:35:52 +00:00
Atsushi Eno c70ee3786a 2007-10-24 Atsushi Enomoto <[email protected]>
* SynchronizationContext.cs : removed SendOrPost().


svn path=/trunk/mcs/; revision=88054
2007-10-24 08:32:21 +00:00
Paolo Molaro 5f6065478f Wed Oct 17 13:24:33 CEST 2007 Paolo Molaro <[email protected]>
* Timer.cs: better cleanup test for the expired array.


svn path=/trunk/mcs/; revision=87649
2007-10-17 11:09:04 +00:00
Paolo Molaro 30285e8c6c Tue Oct 16 17:22:15 CEST 2007 Paolo Molaro <[email protected]>
* Timer.cs: remove expired timers from the the jobs list.


svn path=/trunk/mcs/; revision=87594
2007-10-16 15:05:38 +00:00
Paolo Molaro e12847ece5 Tue Oct 16 12:14:43 CEST 2007 Paolo Molaro <[email protected]>
* Timer.cs: rewrote to use threadpool threads to invoke the callbacks,
	avoid Thread.Abort and Thread.Interrupt and use a single scheduler
	thread, partially from the patch of Rafael Ferreira in bug #315999.
	Fixes bug #315999, #332206.


svn path=/trunk/mcs/; revision=87565
2007-10-16 10:00:19 +00:00
Dick Porter df3e7290d7 2007-10-15 Dick Porter <[email protected]>
* Thread.cs: Initialise synch_cs to null now we aren't using it as
	a monitor lock


svn path=/trunk/mcs/; revision=87515
2007-10-15 14:49:07 +00:00
Dick Porter 685b17b2cb 2007-09-25 Dick Porter <[email protected]>
* Thread.cs: Keep ManagedThreadId constant over the lifetime of a
	Thread.  Patch from [email protected] fixing bugs 325367 and
	325566.



svn path=/trunk/mcs/; revision=86337
2007-09-25 15:28:09 +00:00
Jonathan Pobst 7dc885163c 2007-09-25 Jonathan Pobst <[email protected]>
* SynchronizationContext.cs: Implement SetSynchronizationContext.

2007-09-25  Jonathan Pobst  <[email protected]>

	* AsyncOperationManager.cs: Tie the SynchronizationContext here to
	SynchronizationContext.Current.

2007-09-25  Jonathan Pobst  <[email protected]>

	* AsyncOperationManagerTest.cs: Add test for SynchronizationContext.

2007-09-25  Jonathan Pobst  <[email protected]>

	* System_test.dll.sources: Added AsyncOperationManagerTest.cs.

svn path=/trunk/mcs/; revision=86329
2007-09-25 14:38:37 +00:00
Dick Porter 419508e978 2007-09-06 Dick Porter <[email protected]>
* Timer.cs: Only hold a WeakReference to the runner thread, to
	work around an issue when finalizing at shutdown or (I think)
	appdomain unload.  (Basically, the Thread was being finalized
	first, but the Timer's finalizer was still trying to reference it
	subsequently.)



svn path=/trunk/mcs/; revision=85425
2007-09-06 15:30:17 +00:00
Dick Porter fa099c86ac Back out the thread lock changes until they work
svn path=/trunk/mcs/; revision=85137
2007-08-31 15:40:49 +00:00
Dick Porter d6a38965e2 2007-08-30 Dick Porter <[email protected]>
* Thread.cs: Initialise synch_cs to null now we aren't using it as
	a monitor lock



svn path=/trunk/mcs/; revision=85074
2007-08-30 20:33:52 +00:00
Dick Porter 90542ec8a6 2007-08-10 Gert Driesen <[email protected]>
* Thread.cs: Throw ThreadStateException when retrieving ApartmentState
	or IsBackground if thread is stopped. Fixes bug #81658.

2007-08-10  Gert Driesen  <[email protected]>

	* ThreadTest.cs: Enabled test for bug #81658.


svn path=/trunk/mcs/; revision=83806
2007-08-10 10:18:07 +00:00
Zoltan Varga 126a269c29 2007-08-08 Zoltan Varga <[email protected]>
* Thread.cs: Add a fixme.

svn path=/trunk/mcs/; revision=83682
2007-08-08 17:02:06 +00:00
Miguel de Icaza 4728609ef2 2007-07-28 Miguel de Icaza <[email protected]>
* IdentityReference.cs, SecurityIdentifier.cs, NTAccount.cs: Do
	not recurse infinitely as reported by Jesse Jones, the problem was
	the comparison to null.


svn path=/trunk/mcs/; revision=82912
2007-07-28 15:44:29 +00:00
Miguel de Icaza 6bf8dcac58 Apply Gert's version of the AutoResetEvent, and merge his test
into NUnit.

Test3 is known to be buggy (no harm, as our code just reports a 
warning from the iolayer)


svn path=/trunk/mcs/; revision=82419
2007-07-21 21:18:51 +00:00
Miguel de Icaza 2c2023cc46 2007-07-18 Miguel de Icaza <[email protected]>
* WaitHandle.cs (Handle): in the 2.0 profile, explicitly dispose
	the old SafeWaitHandle, do not wait for the finalizer to run;

	Take ownership of the handle;   The docs did not say that
	assigning to this value would lead to a leak, the docs said that
	in the 1.0 and 1.1 profiles assigning to this property might lead
	to a leak.   My mistake. 

	Fixes: 82134


svn path=/trunk/mcs/; revision=82258
2007-07-18 23:54:06 +00:00
Atsushi Eno 4001d11d0e 2007-07-09 Atsushi Enomoto <[email protected]>
* LockCookie.cs, AsyncFlowControl.cs :
	  added missing operator == and !=.


svn path=/trunk/mcs/; revision=81620
2007-07-09 07:56:54 +00:00
Jonathan Chambers 072ddf092b 2007-05-22 Jonathan Chambers <[email protected]>
* Thread.cs: Use & to check ThreadState rather than ==.
        Fixes AlbumSurfer regression.


svn path=/trunk/mcs/; revision=77799
2007-05-22 17:25:07 +00:00
Jonathan Chambers e706c6bfd2 2007-05-09 Jonathan Chambers <[email protected]>
* Thread.cs: Add ApartmentState related tests.


svn path=/trunk/mcs/; revision=77078
2007-05-09 18:34:13 +00:00
Dick Porter 41b6a2f83b 2007-05-02 Dick Porter <[email protected]>
* ReaderWriterLock.cs: ReaderWriterLock derives from
	CriticalFinalizerObject in the 2.0 profile



svn path=/trunk/mcs/; revision=76561
2007-05-02 10:03:23 +00:00
Dick Porter fcc5135db0 2007-05-01 Dick Porter <[email protected]>
* ThreadState.cs: 
	* AsyncFlowControl.cs: 
	* Interlocked.cs: 
	* RegisteredWaitHandle.cs: 
	* TimerCallback.cs: 
	* ThreadStateException.cs: 
	* Monitor.cs: 
	* ThreadStart.cs: 
	* WaitOrTimerCallback.cs: 
	* LockCookie.cs: 
	* EventWaitHandle.cs: 
	* WaitHandle.cs: 
	* ThreadAbortException.cs: 
	* ThreadPriority.cs: 
	* ReaderWriterLock.cs: 
	* NativeOverlapped.cs: 
	* Mutex.cs: 
	* Overlapped.cs: 
	* ThreadPool.cs: 
	* ApartmentState.cs: 
	* EventResetMode.cs: 
	* SynchronizationLockException.cs: 
	* ManualResetEvent.cs: 
	* WaitCallback.cs: 
	* IOCompletionCallback.cs: 
	* AutoResetEvent.cs: 
	* AbandonedMutexException.cs: 
	* SendOrPostCallback.cs: 
	* ThreadInterruptedException.cs: Update to 2.0 profile



svn path=/trunk/mcs/; revision=76530
2007-05-01 15:28:29 +00:00
Paolo Molaro f84de0774a Thu Apr 19 16:47:52 CEST 2007 Paolo Molaro <[email protected]>
* ThreadPool.cs: patch from Robert Jordan to implement
	ThreadPool.SetMaxThreads.


svn path=/trunk/mcs/; revision=75954
2007-04-19 14:47:37 +00:00
Alp Toker 1fea2a3b9c 2007-04-03 Alp Toker <[email protected]>
* Monitor.cs: Class is static in 2.0.


svn path=/trunk/mcs/; revision=75326
2007-04-03 08:26:53 +00:00
Dick Porter 1e147f0716 2007-03-27 Dick Porter <[email protected]>
* Mutex.cs: Throw ApplicationException if ReleaseMutex() fails.
	Fixes bug 79358.

2007-03-27  Dick Porter  <[email protected]>

	* Environment.cs: Increment mono_corlib_version;



svn path=/trunk/mcs/; revision=75019
2007-03-27 14:35:36 +00:00
Paolo Molaro 25af0d0ca2 Tue Jan 23 17:43:50 CET 2007 Paolo Molaro <[email protected]>
* Thread.cs: mark the GC-tracked field with UIntPtr.


svn path=/trunk/mcs/; revision=71518
2007-01-23 16:44:13 +00:00
Miguel de Icaza 444f1ae2c0 Revert 67496 as it makes running Paint.NET impossible
svn path=/trunk/mcs/; revision=70392
2007-01-03 00:16:03 +00:00
Miguel de Icaza b9a64976cb 2006-12-31 Miguel de Icaza <[email protected]>
* ThreadPool.cs: Stub a method.

svn path=/trunk/mcs/; revision=70391
2007-01-03 00:08:53 +00:00
Miguel de Icaza 48b34f32e8 This patch contains:
SafeWaitHandle support for WaitHandles (2.0)

        A few APIs implemented from Marshal.

2006-12-11  Miguel de Icaza  <[email protected]>

        * WaitHandle.cs: In 2.0 use SafeWaitHandles and the SafeWaitHandle
        patterns instead of using directly the IntPtr Handle.

        Refactor the code to reuse as much as possible, and follow the new
        conventions where appropriate.

2006-12-15  Miguel de Icaza  <[email protected]>

        * Marshal.cs (SecureStringToCoTaskMemAnsi, SecureStringToBSTR,
        SecureStringToCoTaskMemUnicode, ZeroFreeCoTaskMemAnsi,
        ZeroFreeCoTaskMemUnicode, ZeroFreeGlobalAllocAnsi,
        ZeroFreeGlobalAllocUnicode): Implement.

        (StringToCoTaskAuto): return the same as Ansi.

        The ANSI code is out of sync with Mono, which treats ANSI as
        UTF-8.

        Code formatting changes



svn path=/trunk/mcs/; revision=69552
2006-12-15 22:49:32 +00:00
Miguel de Icaza 7ad3e574df Rationalize MonoTODO
svn path=/trunk/mcs/; revision=68718
2006-11-30 00:32:00 +00:00
Robert Jordan 26a197b7c1 2006-11-07 Robert Jordan <[email protected]>
* WaitHandle.cs: Don't assume Assembly.GetEntryAssembly () != null.
	Fixes bug #79859.


svn path=/trunk/mcs/; revision=67496
2006-11-07 21:13:05 +00:00
Dick Porter ddde708fa6 2006-11-02 Dick Porter <[email protected]>
* Thread.cs: Use the new Interrupt and SpinWait icalls.



svn path=/trunk/mcs/; revision=67298
2006-11-02 21:15:38 +00:00
Miguel de Icaza 2172720260 remove unused comments
svn path=/trunk/mcs/; revision=64039
2006-08-19 05:47:30 +00:00
Atsushi Eno 272066a004 2006-07-04 Atsushi Enomoto <[email protected]>
* WaitHandle.cs : CheckArray() is also used in WaitAny(), so added
	  extra argument to skip STAThread check.


svn path=/trunk/mcs/; revision=62240
2006-07-04 09:50:41 +00:00
Duncan Mak 6be53f5a12 2006-06-30 Duncan Mak <[email protected]>
* WaitHandle.cs (CheckArray): Avoid using reflection unless we
	really need to.

svn path=/trunk/mcs/; revision=62181
2006-07-02 05:05:41 +00:00
Duncan Mak 13fd2ec3e5 2006-06-29 Duncan Mak <[email protected]>
* WaitHandle.cs (CheckArray): Throw NotSupportedException if the
	current thread is marked with the STAThreadAttribute. Fixes bug
	#78455.

svn path=/trunk/mcs/; revision=62144
2006-06-29 16:37:54 +00:00
Sebastien Pouliot b2ad2763b5 2006-05-05 Sebastien Pouliot <[email protected]>
* ExecutionContext.cs: Don't capture the compressed stack unless the 
	security manager is active (this wasn't ready to be called in 
	production code).


svn path=/trunk/mcs/; revision=60298
2006-05-05 15:20:47 +00:00
Atsushi Eno 12dbd9ec3f 2004-04-29 Atsushi Enomoto <[email protected]>
* Timer.cs : avoid NullReferenceException when it is already disposed.
	  Patch by [email protected]. Fixed bug #78208.


svn path=/trunk/mcs/; revision=60075
2006-04-29 15:18:50 +00:00
Atsushi Eno d901d22896 2004-04-28 Atsushi Enomoto <[email protected]>
* SynchronizationContext.cs : use ThreadPool in Post(), as suggested
	  by cl (bug #78139).


svn path=/trunk/mcs/; revision=60032
2006-04-28 12:31:05 +00:00
Atsushi Eno 1e2d5e614b 2004-04-04 Atsushi Enomoto <[email protected]>
* Thread.cs : base class is CriticalFinalizerObject.
	* ThreadStartException.cs : no public constructors.


svn path=/trunk/mcs/; revision=58996
2006-04-04 01:09:10 +00:00
Paolo Molaro 4393606a2a Wed Mar 29 18:29:55 CEST 2006 Paolo Molaro <[email protected]>
* Thread.cs: update for the runtime changes to culture caching.


svn path=/trunk/mcs/; revision=58740
2006-03-29 16:30:54 +00:00
Paolo Molaro 2e3ee3d2e5 Wed Mar 15 16:35:49 CET 2006 Paolo Molaro <[email protected]>
* Thread.cs: updates for LocalDataStoreSlot: we use an array as
	storage for the slots now so that LocalDataStoreSlot objects an be
	garbage collected if the user doesn't keep a reference to them.


svn path=/trunk/mcs/; revision=58020
2006-03-15 15:38:52 +00:00
Miguel de Icaza 82d4ad43b0 2006-02-09 Miguel de Icaza <[email protected]>
* Monitor.cs: Patch from Thong Nguyen, Wait (.., Timeout) method
	should allow a -1 (Timeout.Infinite) to mean indefinite wait (the
	code already supported this.

	Removed also a LAMESPEC for missing argument checking in Wait with
	the int argument.
	
	Fixed the use of exceptions.

svn path=/trunk/mcs/; revision=56742
2006-02-10 01:20:37 +00:00
Dick Porter 8265935e1b 2005-12-23 Dick Porter <[email protected]>
* EventWaitHandle.cs: 
        * Mutex.cs: Implement OpenExisting

        * NativeEventCalls.cs: Add OpenEvent icall for OpenExisting in
        2.0.  Add a "created" boolean out parameter to CreateEvent icall.

        * ManualResetEvent.cs: 
        * AutoResetEvent.cs: Update CreateEvent icall signature (now has
        "created" boolean out parameter.)

2005-12-23  Dick Porter  <[email protected]>

        * Semaphore.cs: Implement OpenExisting

2005-12-23  Dick Porter  <[email protected]>

        * MutexRights.cs: New for 2.0 profile

2005-12-23  Dick Porter  <[email protected]>

        * SemaphoreRights.cs: Make the [Flags] enum more obvious

2005-12-23  Dick Porter  <[email protected]>

        * SemaphoreTest.cs: Enable another test

2005-12-23  Dick Porter  <[email protected]>

        * corlib.dll.sources: Added System.Security.AccessControl.MutexRights



svn path=/trunk/mcs/; revision=54801
2005-12-23 20:29:06 +00:00