Marshal.GetThreadFromFiberCookie Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)>]
static member GetThreadFromFiberCookie : 
        cookie:int -> Thread

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: