C# 클래스 multithreading.JobCenter

Represents a job center that creates and manages workers and assignes jobs to them. Not thread-safe!, should only be used from a single thread environment.
파일 보기 프로젝트 열기: denniskb/asvo

공개 메소드들

메소드 설명
assignJob ( IJob job ) : void

Assigns job to all existing workers.

getWorkerCount ( ) : int

Returns the number of existing workers.

initializeWorkers ( int workerCount ) : void

Creates workerCount many workers. Can only be called once.

wait ( ) : void

Waits, until all workers are finished with their current jobs.

메소드 상세

assignJob() 공개 정적인 메소드

Assigns job to all existing workers.
public static assignJob ( IJob job ) : void
job IJob
리턴 void

getWorkerCount() 공개 정적인 메소드

Returns the number of existing workers.
public static getWorkerCount ( ) : int
리턴 int

initializeWorkers() 공개 정적인 메소드

Creates workerCount many workers. Can only be called once.
public static initializeWorkers ( int workerCount ) : void
workerCount int The number of workers to create.
리턴 void

wait() 공개 정적인 메소드

Waits, until all workers are finished with their current jobs.
public static wait ( ) : void
리턴 void