C# Class Netronics.Scheduling.Scheduler

Netronics의 Worker Thread를 관리 해주는 스케줄러 클래스
显示文件 Open project: shlee322/Netronics

Public Properties

Property Type Description
Default Scheduler

Public Methods

Method Description
GetThreadCount ( ) : int

SetThreadCount 메소드로 설정한 Thread의 갯수를 반환하는 메소드

QueueWorkItem ( int index, System.Action action ) : void

해당 index에 맞는 Worker Thread의 작업 큐의 맨 끝에 Action을 추가하는 메소드 같은 index를 가지는 Action은 모두 같은 스래드에서 처리된다.

RunMicrothread ( int index, Microthread microthread ) : void

해당 index에 맞는 Worker Thread에서 Microthread를 시작하는 메소드

Scheduler ( int count = 4, int defaultTimeout = -1 ) : System
SetCurrentTimeout ( int time, System.Action action ) : void
SetDefaultTimeout ( int warning = 1000, int timeout = -1 ) : void
SetThreadCount ( int count, bool background = false ) : void

Worker Therad의 갯수와 Background 여부를 지정하는 메소드 단, SetThreadCount 메소드는 Netronics가 시작되기전에 호출하여야 함

Private Methods

Method Description
Monitoring ( ) : void

Worker Thread를 모니터링 하는 Thread의 메인 Loop

Method Details

GetThreadCount() public method

SetThreadCount 메소드로 설정한 Thread의 갯수를 반환하는 메소드
public GetThreadCount ( ) : int
return int

QueueWorkItem() public method

해당 index에 맞는 Worker Thread의 작업 큐의 맨 끝에 Action을 추가하는 메소드 같은 index를 가지는 Action은 모두 같은 스래드에서 처리된다.
public QueueWorkItem ( int index, System.Action action ) : void
index int 작업구분을 위한 index
action System.Action 호출할 Action
return void

RunMicrothread() public method

해당 index에 맞는 Worker Thread에서 Microthread를 시작하는 메소드
public RunMicrothread ( int index, Microthread microthread ) : void
index int 작업구분을 위한 index
microthread Netronics.Scheduling.Microthreading.Microthread 시작할 Microthread
return void

Scheduler() public method

public Scheduler ( int count = 4, int defaultTimeout = -1 ) : System
count int
defaultTimeout int
return System

SetCurrentTimeout() public method

public SetCurrentTimeout ( int time, System.Action action ) : void
time int
action System.Action
return void

SetDefaultTimeout() public method

public SetDefaultTimeout ( int warning = 1000, int timeout = -1 ) : void
warning int
timeout int
return void

SetThreadCount() public method

Worker Therad의 갯수와 Background 여부를 지정하는 메소드 단, SetThreadCount 메소드는 Netronics가 시작되기전에 호출하여야 함
public SetThreadCount ( int count, bool background = false ) : void
count int Thread 갯수
background bool Background 여부
return void

Property Details

Default public_oe static_oe property

public static Scheduler,Netronics.Scheduling Default
return Scheduler