ExecutorService¶
-
php\concurrent\ExecutorService
Class ExecutorService
Methods
__construct
()¶private
isScheduled
()¶Is Scheduled ?
Returns: bool
isShutdown
()¶Is Shutdown?
Returns: bool
isTerminated
()¶
Returns: bool
execute
($runnable, $env = null)¶Execute some $runnable via the Executor Service
Parameters:
- $runnable – callable
- $env – php\lang\Environment
submit
($runnable, $env = null)¶
Parameters:
- $runnable – callable
- $env – php\lang\Environment
Returns:
schedule
($runnable, $delay, $env = null)¶
Parameters:
- $runnable – callable
- $delay – int
- $env – php\lang\Environment
Returns:
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\concurrent\\Exception
Parameters:
- $timeout – int - - in milliseconds
Returns: bool
- static
newFixedThreadPool
($max)¶
Parameters:
- $max – int
Returns:
- static
newCachedThreadPool
¶
Returns: php\concurrent\ExecutorService
- static
newSingleThreadExecutor
¶Creates an Executor that uses a single worker thread operating off an unbounded queue.
Returns: php\concurrent\ExecutorService
- static
newScheduledThreadPool
($corePoolSize)¶Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.
Parameters:
- $corePoolSize – int
Returns: