C# Class TransportService.ThreadPool

ThreadPool implementation realized inside the TransportService. It is useful to have an indipendent version of the thread pool in this case because using the official .NET implementation the number of total "pool" peer is reduced by other elements; this is bad here because in this part of the project there are realtime requirements. This class is strictly coupled with the ThreadPoolObject class.
Show file Open project: zencoders/sambatyon

Public Methods

Method Description
GetNextThreadInPool ( ) : ThreadPoolObject

Get the first free thread in pool. If there are not free peers it returns a busy peer.

ThreadPool ( ) : System

Default constructor of the class.

ThreadPool ( int poolSize ) : System

Constructor of the class that initialize the pool to a specific size.

Method Details

GetNextThreadInPool() public method

Get the first free thread in pool. If there are not free peers it returns a busy peer.
public GetNextThreadInPool ( ) : ThreadPoolObject
return ThreadPoolObject

ThreadPool() public method

Default constructor of the class.
public ThreadPool ( ) : System
return System

ThreadPool() public method

Constructor of the class that initialize the pool to a specific size.
public ThreadPool ( int poolSize ) : System
poolSize int Size of the pool
return System