Skip to content
Navigation Menu
{{ message }}
forked from jozefizso/SystemWrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIThread.cs
More file actions
154 lines (148 loc) · 10.6 KB
/
Copy pathIThread.cs
File metadata and controls
154 lines (148 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
using System;
namespace SystemInterface.Threading
{
/// <summary>
/// Wrapper for <see cref="System.Threading.Thread"/> class.
/// </summary>
public interface IThread
{
// Methods
/// <summary>
/// Suspends the current thread for a specified time.
/// </summary>
/// <param name="millisecondsTimeout">The number of milliseconds for which the thread is blocked. Specify zero (0) to indicate that this thread should be suspended to allow other waiting threads to execute. Specify Infinite to block the thread indefinitely.</param>
void Sleep(int millisecondsTimeout);
/// <summary>
/// Blocks the current thread for a specified time.
/// </summary>
/// <param name="timeout">A TimeSpan set to the amount of time for which the thread is blocked. Specify zero to indicate that this thread should be suspended to allow other waiting threads to execute. Specify Timeout.Infinite to block the thread indefinitely.</param>
void Sleep(TimeSpan timeout);
/*
// Methods
public Thread(ParameterizedThreadStart start);
public Thread(ThreadStart start);
public Thread(ParameterizedThreadStart start, int maxStackSize);
public Thread(ThreadStart start, int maxStackSize);
[SecurityPermission(SecurityAction.Demand, ControlThread=true)]
public void Abort();
[SecurityPermission(SecurityAction.Demand, ControlThread=true)]
public void Abort(object stateInfo);
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot AllocateDataSlot();
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot AllocateNamedDataSlot(string name);
[MethodImpl(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public static extern void BeginCriticalRegion();
[MethodImpl(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), SecurityPermission(SecurityAction.LinkDemand, ControlThread=true)]
public static extern void BeginThreadAffinity();
[MethodImpl(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public static extern void EndCriticalRegion();
[MethodImpl(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail), SecurityPermission(SecurityAction.LinkDemand, ControlThread=true)]
public static extern void EndThreadAffinity();
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected override void Finalize();
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static void FreeNamedDataSlot(string name);
public ApartmentState GetApartmentState();
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static object GetData(LocalDataStoreSlot slot);
public static AppDomain GetDomain();
public static int GetDomainID();
[MethodImpl(MethodImplOptions.InternalCall), ComVisible(false)]
public override extern int GetHashCode();
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot GetNamedDataSlot(string name);
[SecurityPermission(SecurityAction.Demand, ControlThread=true)]
public void Interrupt();
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public void Join();
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public bool Join(int millisecondsTimeout);
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public bool Join(TimeSpan timeout);
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void MemoryBarrier();
[SecurityPermission(SecurityAction.Demand, ControlThread=true)]
public static void ResetAbort();
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, SelfAffectingThreading=true)]
public void SetApartmentState(ApartmentState state);
[HostProtection(SecurityAction.LinkDemand, SharedState=true, ExternalThreading=true)]
public static void SetData(LocalDataStoreSlot slot, object data);
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public static void SpinWait(int iterations);
[MethodImpl(MethodImplOptions.NoInlining), HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public void Start();
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, ExternalThreading=true)]
public void Start(object parameter);
[HostProtection(SecurityAction.LinkDemand, Synchronization=true, SelfAffectingThreading=true)]
public bool TrySetApartmentState(ApartmentState state);
[MethodImpl(MethodImplOptions.NoInlining)]
public static byte VolatileRead(ref byte address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static double VolatileRead(ref double address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static short VolatileRead(ref short address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static int VolatileRead(ref int address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static long VolatileRead(ref long address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static IntPtr VolatileRead(ref IntPtr address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static object VolatileRead(ref object address);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static sbyte VolatileRead(ref sbyte address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static float VolatileRead(ref float address);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static ushort VolatileRead(ref ushort address);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static uint VolatileRead(ref uint address);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static ulong VolatileRead(ref ulong address);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static UIntPtr VolatileRead(ref UIntPtr address);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref byte address, byte value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref double address, double value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref short address, short value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref int address, int value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref long address, long value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref IntPtr address, IntPtr value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref object address, object value);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static void VolatileWrite(ref sbyte address, sbyte value);
[MethodImpl(MethodImplOptions.NoInlining)]
public static void VolatileWrite(ref float address, float value);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static void VolatileWrite(ref ushort address, ushort value);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static void VolatileWrite(ref uint address, uint value);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static void VolatileWrite(ref ulong address, ulong value);
[MethodImpl(MethodImplOptions.NoInlining), CLSCompliant(false)]
public static void VolatileWrite(ref UIntPtr address, UIntPtr value);
// Properties
public ApartmentState ApartmentState { get; [HostProtection(SecurityAction.LinkDemand, Synchronization=true, SelfAffectingThreading=true)] set; }
public static Context CurrentContext { [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.Infrastructure)] get; }
public CultureInfo CurrentCulture { get; [SecurityPermission(SecurityAction.Demand, ControlThread=true)] set; }
public static IPrincipal CurrentPrincipal { get; [SecurityPermission(SecurityAction.Demand, Flags=SecurityPermissionFlag.ControlPrincipal)] set; }
public static Thread CurrentThread { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] get; }
public CultureInfo CurrentUICulture { get; [HostProtection(SecurityAction.LinkDemand, ExternalThreading=true)] set; }
public ExecutionContext ExecutionContext { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] get; }
public bool IsAlive { get; }
public bool IsBackground { get; [HostProtection(SecurityAction.LinkDemand, SelfAffectingThreading=true)] set; }
public bool IsThreadPoolThread { get; }
public int ManagedThreadId { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get; }
public string Name { get; [HostProtection(SecurityAction.LinkDemand, ExternalThreading=true)] set; }
public ThreadPriority Priority { get; [HostProtection(SecurityAction.LinkDemand, SelfAffectingThreading=true)] set; }
public ThreadState ThreadState { get; }
*/
}
}
You can’t perform that action at this time.
