Author: spouliot
Date: 2005-05-11 11:15:01 -0400 (Wed, 11 May 2005)
New Revision: 44391
Modified:
trunk/mcs/class/corlib/System.Threading/ChangeLog
trunk/mcs/class/corlib/System.Threading/CompressedStack.cs
trunk/mcs/class/corlib/System.Threading/Thread.cs
Log:
2005-05-11 Sebastien Pouliot <[EMAIL PROTECTED]>
* CompressedStack.cs: Allow merging of an existing CompressedStack
with the actual stack of the current Thread.
* Thread.cs: GetCompressedStack and SetCompressedStack are public
before 2.0 but couldn't be seen with mono-api-info because of it's
LinkDemand for the ECMA public key. Removed unused CompressedStack
private field (now part of the ExecutionContext).
Modified: trunk/mcs/class/corlib/System.Threading/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Threading/ChangeLog 2005-05-11 14:56:36 UTC
(rev 44390)
+++ trunk/mcs/class/corlib/System.Threading/ChangeLog 2005-05-11 15:15:01 UTC
(rev 44391)
@@ -1,3 +1,12 @@
+2005-05-11 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * CompressedStack.cs: Allow merging of an existing CompressedStack
+ with the actual stack of the current Thread.
+ * Thread.cs: GetCompressedStack and SetCompressedStack are public
+ before 2.0 but couldn't be seen with mono-api-info because of it's
+ LinkDemand for the ECMA public key. Removed unused CompressedStack
+ private field (now part of the ExecutionContext).
+
2005-05-09 Sebastien Pouliot <[EMAIL PROTECTED]>
* CompressedStack.cs: GetCompressedStack is public before 2.0 but
Modified: trunk/mcs/class/corlib/System.Threading/CompressedStack.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/CompressedStack.cs 2005-05-11
14:56:36 UTC (rev 44390)
+++ trunk/mcs/class/corlib/System.Threading/CompressedStack.cs 2005-05-11
15:15:01 UTC (rev 44391)
@@ -91,8 +91,15 @@
// like Thread.CurrentThread.GetCompressedStack if no
compressed
// stack is present.
CompressedStack cs =
Thread.CurrentThread.GetCompressedStack ();
- if (cs == null)
+ if (cs == null) {
cs = CompressedStack.Capture ();
+ } else {
+ // merge the existing compressed stack (from a
previous Thread) with the current
+ // Thread stack so we can assign "all of it" to
yet another Thread
+ CompressedStack newstack =
CompressedStack.Capture ();
+ for (int i=0; i < newstack._list.Count; i++)
+ cs._list.Add (newstack._list [i]);
+ }
return cs;
}
Modified: trunk/mcs/class/corlib/System.Threading/Thread.cs
===================================================================
--- trunk/mcs/class/corlib/System.Threading/Thread.cs 2005-05-11 14:56:36 UTC
(rev 44390)
+++ trunk/mcs/class/corlib/System.Threading/Thread.cs 2005-05-11 15:15:01 UTC
(rev 44391)
@@ -108,7 +108,6 @@
private IPrincipal _principal;
- private CompressedStack _stack;
private ExecutionContext _ec;
public static Context CurrentContext {
@@ -931,9 +930,12 @@
}
#endif
+ // NOTE: This method doesn't show in the class library status
page because
+ // it cannot be "found" with the StrongNameIdentityPermission
for ECMA key.
+ // But it's there!
[SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
[StrongNameIdentityPermission (SecurityAction.LinkDemand,
PublicKey="00000000000000000400000000000000")]
-#if NET_2_0
+#if NET_1_1
public
#else
internal
@@ -947,9 +949,12 @@
return ((cs == null) || cs.IsEmpty ()) ? null : cs;
}
+ // NOTE: This method doesn't show in the class library status
page because
+ // it cannot be "found" with the StrongNameIdentityPermission
for ECMA key.
+ // But it's there!
[SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode =
true)]
[StrongNameIdentityPermission (SecurityAction.LinkDemand,
PublicKey="00000000000000000400000000000000")]
-#if NET_2_0
+#if NET_1_1
public
#else
internal
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches