Unix and Linux Discussions Tagged with programmer |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
4,374 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
3,571 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,350 |
Software Releases - RSS News |
|
|
|
1 |
2,826 |
Shell Programming and Scripting |
|
|
|
0 |
3,375 |
SCO |
|
|
|
0 |
1,091 |
UNIX and Linux RSS News |
|
|
|
4 |
2,731 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,960 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
4,487 |
Programming |
|
|
|
7 |
4,679 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
12,505 |
Programming |
|
|
|
1 |
4,455 |
Programming |
|
|
|
4 |
5,754 |
Programming |
|
|
|
2 |
8,261 |
Programming |
|
|
|
1 |
5,968 |
Programming |
|
|
|
2 |
9,759 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
10,265 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
6,299 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,055 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
12,200 |
Programming |
|
|
|
2 |
3,194 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
6 |
10,412 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,425 |
UNIX for Dummies Questions & Answers |
WORKER(3) 1 WORKER(3)
The Worker class
INTRODUCTION
Worker Threads have a persistent context, as such should be used over Threads in most cases.
When a Worker is started, the run method will be executed, but the Thread will not leave until one of the following conditions are met:
othe Worker goes out of scope (no more references remain)
othe programmer calls shutdown
othe script dies
This means the programmer can reuse the context throughout execution; placing objects on the stack of the Worker will cause the Worker to
execute the stacked objects run method.
Warning
The programmer must retain references to stacked objects until they are executed or unstacked; the Pool class provides a higher
level abstraction of the Worker functionality and manages references for the programmer.
CLASS SYNOPSIS
Worker
Workerextends
ThreadTraversableCountableArrayAccess
Methods
o public integer Worker::getStacked (void )
o public boolean Worker::isShutdown (void )
o public boolean Worker::isWorking (void )
o public boolean Worker::shutdown (void )
o public integer Worker::stack (Threaded &$work)
o public integer Worker::unstack ([Threaded &$work])
Inherited methods
o public void Thread::detach (void )
o public integer Thread::getCreatorId (void )
o publicstatic Thread Thread::getCurrentThread (void )
o publicstatic integer Thread::getCurrentThreadId (void )
o public integer Thread::getThreadId (void )
o publicstatic mixed Thread::globally (void )
o public boolean Thread::isJoined (void )
o public boolean Thread::isStarted (void )
o public boolean Thread::join (void )
o public void Thread::kill (void )
o public boolean Thread::start ([integer $options])
PHP Documentation Group WORKER(3)