GetThreadFromFiberCookie Method
TOC
Collapse the table of content
Expand the table of content

Marshal.GetThreadFromFiberCookie Method (Int32)

 
Note: This API is now obsolete.

Converts a fiber cookie into the corresponding System.Threading.Thread instance.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
[ObsoleteAttribute("The GetThreadFromFiberCookie method has been deprecated.  Use the hosting API to perform this operation.", 
	false)]
public static Thread GetThreadFromFiberCookie(
	int cookie
)

Parameters

cookie
Type: System.Int32

An integer that represents a fiber cookie.

Return Value

Type: System.Threading.Thread

A thread that corresponds to the cookie parameter.

Exception Condition
ArgumentException

The cookie parameter is 0.

Fiber cookies are opaque tokens that are used by the host when alerting the common language runtime to its fiber-scheduling decisions. They consist of a stack and register context.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft