Yann ROBIN
d9679bb798
fix code according to mono coding guidelines
2012-12-10 20:55:14 +01:00
Yann ROBIN
2238ba7dc0
add LogicalCallContext to ExecutionContext
...
Save LogicalCallContext when Capture is called
Restore LogicalCallContext on Run.
see msdn for behavior of ExecutionContext http://msdn.microsoft.com/en-us/library/h84136b2.aspx
2012-12-07 17:36:24 +01:00
Marek Safar
5b4d085272
Fix NativeOverlapped definition. Fixes #8449
2012-11-20 13:04:14 +01:00
Zoltan Varga
1b0326d73f
Clean up the InternalThread structure. Synchronize fields between the managed and unmanaged versions, group reference fields together near the beginning.
2012-10-05 14:29:37 +02:00
Marek Safar
7883a2dafd
Clean up some static initializers
2012-10-03 12:19:55 +01:00
Petr Onderka
d7f2593b19
new CancellationTokenRegistration().Dispose() shouldn't throw
2012-08-19 23:58:16 +02:00
Marek Safar
241c64c12c
Fix attribute arguments
2012-07-27 12:25:42 +01:00
Marek Safar
b0c1e99f75
Fix attribute arguments
2012-07-26 12:48:27 +01:00
Jérémie Laval
c13bd7df0a
[corlib] Remove now unneeded line
2012-07-23 12:59:47 +01:00
Jérémie Laval
ca351b61c1
[corlib] Also unregister linked tokens when the proxy CancellationTokenSource becomes cancelled.
2012-07-23 12:54:21 +01:00
Jérémie Laval
75222a62c5
[corlib] Linked token callback to the proxy CancellationTokenSource shouldn't throw ODE in concurrent situations.
2012-07-23 12:48:40 +01:00
Jérémie Laval
253c5fb1d3
[corlib] Dispose linked tokens connections when disposing the resulting CancellationTokenSource
...
Based on baulig's patch: https://github.com/baulig/mono/commit/3ee4f7600b8efe61f7a701a93fffed8373b7b4b3
2012-07-23 11:48:55 +01:00
James Bellinger
c6f901c2cf
Mutexes and event wait handles now work, with tests included. Fixed the exception on failure for MutexSecurity.
2012-07-07 18:45:26 -04:00
Rodrigo Kumpera
70ac21baef
New field InternalThread::ignore_next_signal. Bump corlib version due to layout change.
2012-06-27 19:59:54 -03:00
Marek Safar
f293d90615
Fix few warnings
2012-06-26 13:26:56 +01:00
Marek Safar
9696a57e64
Add Environment::CurrentManagedThreadId
2012-06-21 15:38:45 +01:00
Marek Safar
d5a78c50c1
Fix CancellationTokenSource cancellation during Dispose
2012-06-11 16:02:39 +01:00
Miguel de Icaza
93b810834d
[class libraries] drop ONLY_1_1
2012-06-02 21:31:50 -04:00
Miguel de Icaza
ae0feab435
Removal of NET_1_1 defines and some NET_2_0; Both defines are true these days in Mono, no versions prior to 2.0 are supported
2012-06-01 18:04:24 -04:00
Jonathan Pryor
9d66910069
[corlib] Allow SynchronizationContext.Current to work on MfA
...
For the main (UI) thread, make SynchronizationContext.Current return
the Android.App.Application.SynchronizationContext property.
2012-06-01 12:48:53 -04:00
Jeremie Laval
c698307f5b
[corlib] A CancellationTokenRegistration instance should always have a working GetHashCode method
...
Reported by knittl
2012-05-28 14:26:00 +01:00
Jeremie Laval
b0dcb61630
[corlib] Fix NullRef when using dispose a CancellationTokenRegistration when the initial source has been disposed
2012-05-16 11:50:17 +01:00
Sebastien Pouliot
1eb623e07a
Thread.Finalize is needed in Profile3 of the Portable Class Libraries.
2012-05-09 14:36:21 -04:00
Konrad M. Kruczynski
73ca5b067f
Another fix and unit test added.
...
Now all three possible cases are tested (and working).
2012-04-23 15:44:16 +02:00
Konrad M. Kruczynski
83c06e2b22
Fixes as per the Rodrigo's comment.
...
Wait now throws an exception in case of cancellation token was
cancelled.
2012-04-23 12:02:09 +02:00
Konrad M. Kruczynski
e6e63c0aa6
Fix for bug in ManualResetEventSlim.
...
The problem occured when one waited for an event with the
cancellation token and the wait was successful but not
immediate. In that case Wait returned false instead of true,
because of wait handle number mismatch. Also the unit test was
added.
2012-04-22 22:24:14 +02:00
Jeremie Laval
9738fcb590
Improve ManualResetEventSlim consistency with new algorithm
2012-04-11 14:58:21 +01:00
Jeremie Laval
38c3d85451
Remove now useless barriers in ManualResetEventSlim since Interlocked do the job for us
...
Related to f8b8ea08f6
2012-04-10 12:48:03 +01:00
Jeremie Laval
7167f57c4d
Rework CancellationTokenSource to remove locking. Fix #4173 .
...
Issue reported by MartinG, unit test code based on his repro.
2012-04-10 12:39:03 +01:00
Jeremie Laval
f8b8ea08f6
Switch from boolean to count mode to safely detect disposability in ManualResetEventSlim.
...
Having two concurrent operations of Set/Reset who succeeded in fetching the handle before it was disabled all the while trying to dispose may have caused a early release of the handle.
2012-04-10 12:39:02 +01:00
Jeremie Laval
ac759e6aa9
Correct CancellationTokenSource locking. Fix #3756 .
2012-03-06 10:20:00 +00:00
Marek Safar
b1683b85d3
Remove some unused code
2012-02-24 13:14:08 +00:00
Rodrigo Kumpera
83dccf8fe7
Add all missing sequential layout directives to corlib and system.
2011-12-13 11:57:23 -02:00
Rodrigo Kumpera
3fb5e02a64
Fix parameter name in the exception constructor.
2011-12-07 15:19:37 -02:00
Sebastien Pouliot
e37850a605
Ensure that [Parameterized]ThreadStart code is always wrapped in a NSAutoreleasePool for MonoTouch. Fix bug #1999
2011-11-29 19:54:44 -05:00
Marek Safar
0b9bd61dc4
Fix few warnings
2011-11-11 19:03:33 +00:00
Marek Safar
0dcaf11de5
Add optimization for Timeout.Infinite
2011-11-08 19:16:42 +00:00
Marek Safar
bd98012400
Fix subtle issues with CancellationTokenSource and implement 4.5 methods
2011-11-07 17:18:26 +00:00
Marek Safar
0db188bfbb
Fix LazyInitializer
2011-11-04 13:10:18 +00:00
Marek Safar
c722897b1f
Remove unwanted WaitHandle finalizer
2011-10-25 10:14:14 +01:00
Marek Safar
690809bb5f
Fix 4.5 conditional
2011-10-19 15:39:13 +01:00
Marek Safar
f2fdae3283
Implement System.Threading.Volatile
2011-10-19 15:34:24 +01:00
Marek Safar
57fc0680d5
Fix few races in ManualResetEventSlim and make it compatible with .net
2011-10-18 17:45:33 +01:00
Marek Safar
fa8e1b0785
Compatibility fixes to CountdownEvent
2011-10-17 17:07:07 +01:00
Zoltan Varga
8541b2548a
Add locking to EventWaitHandle.Set/Reset to avoid crashes when another thread disposes the handle. Fixes #1499 .
2011-10-17 15:13:25 +02:00
Jérémie Laval
868cff3cb1
Make ManualResetEventSlim Dispose/(Set,Reset) combo a bit safer. Add unit test.
2011-10-15 21:13:36 +02:00
Jérémie Laval
54dab2cec8
Remove need for a delegate instance in CountdownEvent and just apply the specific test everytime
2011-10-15 19:41:27 +02:00
Jérémie Laval
f1441786ef
Call correctly Dipose in CoutdownEvent
2011-10-14 14:50:52 +02:00
Jérémie Laval
d691e17299
Update ManualResetEventSlim to handle disposal correctly
2011-10-14 14:50:52 +02:00
Jérémie Laval
4770b24fa9
Tune Marek's work on Task.WaitAny, Task.Wait and Task.WaitAll
2011-10-13 21:42:21 +02:00