Marshal.GetThreadFromFiberCookie Method (Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on 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)

[ObsoleteAttribute("The GetThreadFromFiberCookie method has been deprecated.  Use the hosting API to perform this operation.", 
public static Thread GetThreadFromFiberCookie(
	int 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

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.


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