ThreadPool¶
-
php\lang\ThreadPool Class ThreadPool
Methods
__construct()¶private
isScheduled()¶Is Scheduled ?
Результат: bool
isShutdown()¶Is Shutdown?
Результат: bool
isTerminated()¶
Результат: bool
execute($runnable, $env = null)¶Execute some $runnable via the Executor Service
Параметры:
- $runnable –
callable- $env – php\lang\Environment
submit($runnable, $env = null)¶
Параметры:
- $runnable –
callable- $env – php\lang\Environment
Результат:
schedule($runnable, $delay, $env = null)¶
Параметры:
- $runnable –
callable- $delay –
int- $env – php\lang\Environment
Результат:
shutdown()¶
shutdownNow()¶
awaitTermination($timeout)¶Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
throws
php\lang\\Exception
Параметры:
- $timeout –
int- - in millisecondsРезультат:
bool
- static
create($coreSize, $maxSize, $keepAliveTime = 0)¶
Параметры:
- $coreSize –
int- the number of threads to keep in the pool, even if they are idle- $maxSize –
int- the maximum number of threads to allow in the pool- $keepAliveTime –
int- in millisРезультат:
- static
createFixed($max)¶
Параметры:
- $max –
intРезультат:
- static
createCached¶
Результат: php\lang\ThreadPool
- static
createSingle¶Creates an Executor that uses a single worker thread operating off an unbounded queue.
Результат: php\lang\ThreadPool
- static
createScheduled($corePoolSize)¶Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.
Параметры:
- $corePoolSize –
intРезультат: