Table of Contents

Interface IThreadPool

Namespace
SunamoThreading.Interfaces
Assembly
SunamoThreading.dll

Defines the contract for a thread pool that can queue work items and resize dynamically.

public interface IThreadPool
Extension Methods

Properties

PoolSize

Gets the configured pool size.

int PoolSize { get; }

Property Value

int

Methods

QueueUserWorkItem(WaitCallback)

Queues a work item for execution by a thread in the pool.

bool QueueUserWorkItem(WaitCallback callBack)

Parameters

callBack WaitCallback

The callback method to be queued for execution.

Returns

bool

True if the work item was successfully queued.

SetPoolSize(int)

Sets the desired number of threads in the pool.

bool SetPoolSize(int size)

Parameters

size int

The desired number of threads.

Returns

bool

True if the pool size was successfully updated.