RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Threading Namespace Reference

包含启用多线程编程的类型 More...

Classes

class  AtomicLock
 using atomic types to synchronize memory accesses among different threads More...
 
class  Event
 表示线程同步事件 More...
 
class  Interlocked
 为多个线程共享的变量提供原子操作 More...
 
class  IntrinsicLock
 using Interlocked* intrinsics to do manual synchronization More...
 
class  Monitor
 Provides a mechanism that synchronizes access to objects. More...
 
class  Mutex
 表示一个同步基元, 也可用于进程间同步 More...
 
class  ReentrantLock
 A ReentrantLock is owned by the thread last successfully locking, but not yet unlocking it. A thread invoking lock will return, successfully acquiring the lock, when the lock is not owned by another thread. The method will return immediately if the current thread already owns the lock. More...
 
class  Runnable
 表示线程开始要执行的一系列方法 More...
 
class  SafeObject
 encapsulates a object whose access is guaranteed to be thread-safe More...
 
class  SafeObjectHelper
 
class  Semaphore
 限制可同时访问某一资源或资源池的线程数 More...
 
class  Synchronizable
 encapsulates a object so as to make it synchronizable More...
 
class  Thread
 Creates and controls a thread, sets its priority, and gets its status How to: Set a Thread Name in Native Code https://msdn.microsoft.com/en-us//library/xcb2z8hs.aspx More...
 
class  ThreadPool
 线程池支持类 More...
 
struct  ThreadPoolTask
 表示线程池工作任务对象 More...
 
struct  ThreadPoolWorker
 表示线程池工作线程 More...
 
class  Tls
 表示线程局部存储接口 More...
 
class  TlsItem
 表示线程局部存储对象 More...
 
class  WaitHandle
 封装等待对共享资源的独占访问的操作系统特定的对象 More...
 

Typedefs

typedef Runnable::CppParameterizedThreadStart ThreadPoolExecutor
 表示线程池线程要执行的回调方法 More...
 
typedef Synchronizable< Collections::Generic::Queue< ThreadPoolTask > > TaskQueue
 线程池任务结构 More...
 
typedef Synchronizable< Collections::Generic::List< ThreadPoolWorker *, ThreadPoolWorker > > WorkerList
 
typedef Synchronizable< Collections::Generic::List< ThreadPoolWorker * > > TempWorkerList
 
typedef unsigned long TlsId
 表示线程局部存储地址量 More...
 

Enumerations

enum  ThreadState : int {
  ThreadState::Unstarted = 0, ThreadState::Running = 1, ThreadState::Stopped = 2, ThreadState::Suspended = 3,
  ThreadState::Aborted = 4
}
 指定 Thread 的执行状态 More...
 
enum  ThreadPriority { ThreadPriority::ErrorPriority = -1, ThreadPriority::LowestPriority = 0, ThreadPriority::HighestPriority = 31 }
 指定 Thread 的调度优先级 More...
 
enum  WaitStatus {
  WAIT_ACCESS_DENIED, WAIT_INVALID_HANDLE, WAIT_SUCCESS, WAIT_TIMEOUTED,
  WAIT_USER_APC, WAIT_ALERTED = WAIT_USER_APC
}
 
enum  EventType { Notification_Event, Synchronization_Event }
 表示事件类型 More...
 

Functions

 RLIB_INTERNAL_EXCEPTION (ThreadException, Exception)
 表示线程异常 More...
 

Detailed Description

包含启用多线程编程的类型

Typedef Documentation

typedef Runnable::CppParameterizedThreadStart System::Threading::ThreadPoolExecutor

表示线程池线程要执行的回调方法

typedef unsigned long System::Threading::TlsId

表示线程局部存储地址量

Enumeration Type Documentation

表示事件类型

指定 Thread 的调度优先级

Enumerator
ErrorPriority 

获取调度优先级失败

LowestPriority 

Lowest thread priority level

HighestPriority 

Highest thread priority level

enum System::Threading::ThreadState : int
strong

指定 Thread 的执行状态

Enumerator
Unstarted 

尚未对线程调用 Thread.Start 方法

Running 

线程已启动,它未被阻塞

Stopped 

线程已终止

Suspended 

线程已挂起

Aborted 

调用 Thread.Exit 方法中止了线程

Enumerator
WAIT_ACCESS_DENIED 

The caller did not have the required privileges to the event specified by the Handle parameter

WAIT_INVALID_HANDLE 

The supplied Handle parameter was invalid

WAIT_SUCCESS 

The specified object satisfied the wait

WAIT_TIMEOUTED 

A time out occurred before the object was set to a signaled state. This value can be returned when the specified set of wait conditions cannot be immediately met and the Timeout parameter is set to zero

WAIT_USER_APC 

The wait was aborted to deliver a user APC to the current thread

WAIT_ALERTED 

The wait was aborted to deliver an alert to the current thread

Function Documentation

System::Threading::RLIB_INTERNAL_EXCEPTION ( ThreadException  ,
Exception   
)

表示线程异常