private int small_id;
private IntPtr manage_callback;
private object pending_exception;
+ /* This is the ExecutionContext that will be set by
+ start_wrapper() in the runtime. */
+ private ExecutionContext ec_to_set;
+
/*
* These fields are used to avoid having to increment corlib versions
* when a new field is added to the unmanaged MonoThread structure.
[ThreadStatic]
static object[] local_slots;
+ /* The actual ExecutionContext of the thread. It's
+ ThreadStatic so that it's not shared between
+ AppDomains. */
[ThreadStatic]
static ExecutionContext _ec;
// propagate informations from the original thread to the new thread
#if NET_2_0
if (!ExecutionContext.IsFlowSuppressed ())
- _ec = ExecutionContext.Capture ();
+ ec_to_set = ExecutionContext.Capture ();
#else
// before 2.0 this was only used for security (mostly CAS) so we
// do this only if the security manager is active
if (SecurityManager.SecurityEnabled)
- _ec = ExecutionContext.Capture ();
+ ec_to_set = ExecutionContext.Capture ();
#endif
if (CurrentThread._principal != null)
_principal = CurrentThread._principal;
+2009-05-26 Mark Probst <mark.probst@gmail.com>
+
+ * Thread.cs: Don't set the execution context when creating a
+ thread because the _ec member is thread static and we set the
+ wrong one. It's now set by the runtime. We just provide the
+ correct one.
+
+ * Environment.cs: Bump corlib version.
+
2009-05-22 Zoltan Varga <vargaz@gmail.com>
* Tuple.cs Tuples.cs: New files.
* Changes which are already detected at runtime, like the addition
* of icalls, do not require an increment.
*/
- private const int mono_corlib_version = 76;
+ private const int mono_corlib_version = 77;
#if NET_2_0
[ComVisible (true)]