Marshal.GetThreadFromFiberCookie(Int32) Method

Definition

Caution

The GetThreadFromFiberCookie method has been deprecated. Use the hosting API to perform this operation.

Converts a fiber cookie into the corresponding Thread instance.

C#
public static System.Threading.Thread GetThreadFromFiberCookie(int cookie);
C#
[System.Obsolete("The GetThreadFromFiberCookie method has been deprecated.  Use the hosting API to perform this operation.", false)]
public static System.Threading.Thread GetThreadFromFiberCookie(int cookie);
C#
[System.Obsolete("The GetThreadFromFiberCookie method has been deprecated.  Use the hosting API to perform this operation.", false)]
[System.Security.SecurityCritical]
public static System.Threading.Thread GetThreadFromFiberCookie(int cookie);

Parameters

cookie
Int32

An integer that represents a fiber cookie.

Returns

A thread that corresponds to the cookie parameter.

Attributes

Exceptions

The cookie parameter is 0.

Remarks

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.

Applies to

Product Versions (Obsolete)
.NET Framework 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)

See also