C# 클래스 Netronics.Scheduling.Scheduler

Netronics의 Worker Thread를 관리 해주는 스케줄러 클래스
파일 보기 프로젝트 열기: shlee322/Netronics

공개 프로퍼티들

프로퍼티 타입 설명
Default Scheduler

공개 메소드들

메소드 설명
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가 시작되기전에 호출하여야 함

비공개 메소드들

메소드 설명
Monitoring ( ) : void

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

메소드 상세

GetThreadCount() 공개 메소드

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

QueueWorkItem() 공개 메소드

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

RunMicrothread() 공개 메소드

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

Scheduler() 공개 메소드

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

SetCurrentTimeout() 공개 메소드

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

SetDefaultTimeout() 공개 메소드

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

SetThreadCount() 공개 메소드

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

프로퍼티 상세

Default 공개적으로 정적으로 프로퍼티

public static Scheduler,Netronics.Scheduling Default
리턴 Scheduler