C# 클래스 ControlSystem.ThreadHandling

Class to handle all threads in system, everything handled by a unique description tag that stays with a thread from moment it gets added till it gets removed.
파일 보기 프로젝트 열기: syre/SortingIndustrialRobot

공개 메소드들

메소드 설명
ThreadHandling ( ) : System

Constructor for class : Makes a new list for usage

abortAllAndWait ( ) : void

Functions aborts all threads currently running and waits for them to finish

abortAndWait ( string _description ) : void

Terminates thread with supplied description, then waits for it to finish terminating

addThread ( ParameterizedThreadStart _parameterizedThreadStart, string _description ) : void

Overloaded addThread function, so that it can add threads with a parameterizedThreadStart to a thread list by a description

addThread ( ThreadStart _threadStart, string _description ) : void

addThread function, adds a function as a thread to a list, which needs its own thread for running. This specific function handles ThreadStart parameter, which means it can only take functions with no parameters as argument

find ( string _description ) : ThreadHolder

Function that looks up saved threads by description

removeThread ( string _description ) : void

Removes the specified thread from the thread list (Stops and waits for it to finish if it was running).

start ( string _description ) : void

Starts the thread from supplied description if found.

start ( string _description, object _obj ) : void

Starts the thread from supplied description if found but with a given parameter object

비공개 메소드들

메소드 설명
remakeThread ( ThreadHolder _threadHolder ) : void

Remakes the thread so it can run under same name again.

메소드 상세

ThreadHandling() 공개 메소드

Constructor for class : Makes a new list for usage
public ThreadHandling ( ) : System
리턴 System

abortAllAndWait() 공개 메소드

Functions aborts all threads currently running and waits for them to finish
public abortAllAndWait ( ) : void
리턴 void

abortAndWait() 공개 메소드

Terminates thread with supplied description, then waits for it to finish terminating
public abortAndWait ( string _description ) : void
_description string Description which the function needs to terminate thread for and wait for
리턴 void

addThread() 공개 메소드

Overloaded addThread function, so that it can add threads with a parameterizedThreadStart to a thread list by a description
public addThread ( ParameterizedThreadStart _parameterizedThreadStart, string _description ) : void
_parameterizedThreadStart ParameterizedThreadStart Parameter is name of function that needs its own thread, as its paramterizedThreadStart, it means it have to be a function with parameter object: (functionname(object example){})
_description string Description which the thread needs to be saved as (unique)
리턴 void

addThread() 공개 메소드

addThread function, adds a function as a thread to a list, which needs its own thread for running. This specific function handles ThreadStart parameter, which means it can only take functions with no parameters as argument
public addThread ( ThreadStart _threadStart, string _description ) : void
_threadStart ThreadStart Parameter is name of function that needs its own thread, as its Threadstart, it means it have to be a function with no parameters: (functionname(){})
_description string Description which the thread needs to be saved as (unique)
리턴 void

find() 공개 메소드

Function that looks up saved threads by description
public find ( string _description ) : ThreadHolder
_description string String that descripes the thread looking for
리턴 ThreadHolder

removeThread() 공개 메소드

Removes the specified thread from the thread list (Stops and waits for it to finish if it was running).
public removeThread ( string _description ) : void
_description string Description which the function need to find the thread that should be deleted
리턴 void

start() 공개 메소드

Starts the thread from supplied description if found.
public start ( string _description ) : void
_description string Description is a string which the function needs to search and find a thread for in a list
리턴 void

start() 공개 메소드

Starts the thread from supplied description if found but with a given parameter object
public start ( string _description, object _obj ) : void
_description string Description is a string which the function needs to search and find a thread for in a list
_obj object An object that needs to be passed on to the thread as start parameter
리턴 void