From f187e2978d9519cd6d613348cf9d5933b26de57d Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Tue, 6 Nov 2012 21:10:11 +0000 Subject: [PATCH] updates 0.0.37 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328266 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pthreads/book.xml | 44 +++++++++++ reference/pthreads/cond.xml | 67 +++++++++++++++++ reference/pthreads/cond/broadcast.xml | 67 +++++++++++++++++ reference/pthreads/cond/create.xml | 53 ++++++++++++++ reference/pthreads/cond/destroy.xml | 72 ++++++++++++++++++ reference/pthreads/cond/signal.xml | 67 +++++++++++++++++ reference/pthreads/cond/wait.xml | 84 +++++++++++++++++++++ reference/pthreads/configure.xml | 35 +++++++++ reference/pthreads/ini.xml | 69 ++++++++++++++++++ reference/pthreads/modifiers.xml | 85 ++++++++++++++++++++++ reference/pthreads/mutex.xml | 67 +++++++++++++++++ reference/pthreads/mutex/create.xml | 63 ++++++++++++++++ reference/pthreads/mutex/destroy.xml | 68 +++++++++++++++++ reference/pthreads/mutex/lock.xml | 66 +++++++++++++++++ reference/pthreads/mutex/trylock.xml | 65 +++++++++++++++++ reference/pthreads/mutex/unlock.xml | 78 ++++++++++++++++++++ reference/pthreads/reference.xml | 30 ++++++++ reference/pthreads/setup.xml | 52 +++++++++++++ reference/pthreads/stackable.xml | 67 +++++++++++++++++ reference/pthreads/stackable/isrunning.xml | 55 ++++++++++++++ reference/pthreads/stackable/iswaiting.xml | 55 ++++++++++++++ reference/pthreads/stackable/notify.xml | 55 ++++++++++++++ reference/pthreads/stackable/run.xml | 55 ++++++++++++++ reference/pthreads/stackable/wait.xml | 64 ++++++++++++++++ reference/pthreads/thread.xml | 67 +++++++++++++++++ reference/pthreads/thread/getcreatorid.xml | 55 ++++++++++++++ reference/pthreads/thread/getthreadid.xml | 53 ++++++++++++++ reference/pthreads/thread/isjoined.xml | 55 ++++++++++++++ reference/pthreads/thread/isrunning.xml | 60 +++++++++++++++ reference/pthreads/thread/isstarted.xml | 55 ++++++++++++++ reference/pthreads/thread/iswaiting.xml | 55 ++++++++++++++ reference/pthreads/thread/join.xml | 55 ++++++++++++++ reference/pthreads/thread/notify.xml | 55 ++++++++++++++ reference/pthreads/thread/run.xml | 55 ++++++++++++++ reference/pthreads/thread/start.xml | 55 ++++++++++++++ reference/pthreads/thread/wait.xml | 62 ++++++++++++++++ reference/pthreads/versions.xml | 66 +++++++++++++++++ reference/pthreads/worker.xml | 67 +++++++++++++++++ reference/pthreads/worker/getcreatorid.xml | 55 ++++++++++++++ reference/pthreads/worker/getstacked.xml | 55 ++++++++++++++ reference/pthreads/worker/getthreadid.xml | 55 ++++++++++++++ reference/pthreads/worker/isshutdown.xml | 55 ++++++++++++++ reference/pthreads/worker/isworking.xml | 55 ++++++++++++++ reference/pthreads/worker/run.xml | 55 ++++++++++++++ reference/pthreads/worker/shutdown.xml | 53 ++++++++++++++ reference/pthreads/worker/stack.xml | 64 ++++++++++++++++ reference/pthreads/worker/start.xml | 55 ++++++++++++++ reference/pthreads/worker/unstack.xml | 64 ++++++++++++++++ 48 files changed, 2864 insertions(+) create mode 100644 reference/pthreads/book.xml create mode 100644 reference/pthreads/cond.xml create mode 100644 reference/pthreads/cond/broadcast.xml create mode 100644 reference/pthreads/cond/create.xml create mode 100644 reference/pthreads/cond/destroy.xml create mode 100644 reference/pthreads/cond/signal.xml create mode 100644 reference/pthreads/cond/wait.xml create mode 100644 reference/pthreads/configure.xml create mode 100644 reference/pthreads/ini.xml create mode 100644 reference/pthreads/modifiers.xml create mode 100644 reference/pthreads/mutex.xml create mode 100644 reference/pthreads/mutex/create.xml create mode 100644 reference/pthreads/mutex/destroy.xml create mode 100644 reference/pthreads/mutex/lock.xml create mode 100644 reference/pthreads/mutex/trylock.xml create mode 100644 reference/pthreads/mutex/unlock.xml create mode 100644 reference/pthreads/reference.xml create mode 100644 reference/pthreads/setup.xml create mode 100644 reference/pthreads/stackable.xml create mode 100644 reference/pthreads/stackable/isrunning.xml create mode 100644 reference/pthreads/stackable/iswaiting.xml create mode 100644 reference/pthreads/stackable/notify.xml create mode 100644 reference/pthreads/stackable/run.xml create mode 100644 reference/pthreads/stackable/wait.xml create mode 100644 reference/pthreads/thread.xml create mode 100644 reference/pthreads/thread/getcreatorid.xml create mode 100644 reference/pthreads/thread/getthreadid.xml create mode 100644 reference/pthreads/thread/isjoined.xml create mode 100644 reference/pthreads/thread/isrunning.xml create mode 100644 reference/pthreads/thread/isstarted.xml create mode 100644 reference/pthreads/thread/iswaiting.xml create mode 100644 reference/pthreads/thread/join.xml create mode 100644 reference/pthreads/thread/notify.xml create mode 100644 reference/pthreads/thread/run.xml create mode 100644 reference/pthreads/thread/start.xml create mode 100644 reference/pthreads/thread/wait.xml create mode 100644 reference/pthreads/versions.xml create mode 100644 reference/pthreads/worker.xml create mode 100644 reference/pthreads/worker/getcreatorid.xml create mode 100644 reference/pthreads/worker/getstacked.xml create mode 100644 reference/pthreads/worker/getthreadid.xml create mode 100644 reference/pthreads/worker/isshutdown.xml create mode 100644 reference/pthreads/worker/isworking.xml create mode 100644 reference/pthreads/worker/run.xml create mode 100644 reference/pthreads/worker/shutdown.xml create mode 100644 reference/pthreads/worker/stack.xml create mode 100644 reference/pthreads/worker/start.xml create mode 100644 reference/pthreads/worker/unstack.xml diff --git a/reference/pthreads/book.xml b/reference/pthreads/book.xml new file mode 100644 index 0000000000..b9300e0314 --- /dev/null +++ b/reference/pthreads/book.xml @@ -0,0 +1,44 @@ + + + + + pthreads + pthreads + + + &reftitle.intro; + + pthreads uses the well tested abilities of TSRM and PHP to provide object oreintated multi-threading capabilities. + + + + &reference.pthreads.setup; + &reference.pthreads.thread; + &reference.pthreads.worker; + &reference.pthreads.stackable; + &reference.pthreads.modifiers; + &reference.pthreads.mutex; + &reference.pthreads.cond; + + + + diff --git a/reference/pthreads/cond.xml b/reference/pthreads/cond.xml new file mode 100644 index 0000000000..3ca922e1fc --- /dev/null +++ b/reference/pthreads/cond.xml @@ -0,0 +1,67 @@ + + + + + + The Cond class + Cond + + + + +
+ &reftitle.intro; + + The static methods contained in the Cond class provide direct access to Posix Condition Variables. + +
+ + +
+ &reftitle.classsynopsis; + + + + Cond + + + + + Cond + + + + + &Methods; + + + + +
+ +
+ + &reference.pthreads.entities.cond; + +
+ + diff --git a/reference/pthreads/cond/broadcast.xml b/reference/pthreads/cond/broadcast.xml new file mode 100644 index 0000000000..6fcaeb910d --- /dev/null +++ b/reference/pthreads/cond/broadcast.xml @@ -0,0 +1,67 @@ + + + + + + Cond::broadcast + Broadcast a condition to all Threads + + + + &reftitle.description; + + final + public + static + boolean + Cond::broadcast + + long + condition + + + Broadcast to all Threads blocking on a call to Cond::wait. + + + + &reftitle.parameters; + + + condition + + A handle to a Condition Variables returned by a previous call to Cond::create + + + + + + + &reftitle.returnvalues; + + A boolean indication of success. + + + + + + + diff --git a/reference/pthreads/cond/create.xml b/reference/pthreads/cond/create.xml new file mode 100644 index 0000000000..38212a4c52 --- /dev/null +++ b/reference/pthreads/cond/create.xml @@ -0,0 +1,53 @@ + + + + + + Cond::create + Create a new Condition Variable + + + + &reftitle.description; + + final + public + static + long + Cond::create + + + Creates a new Condition Variable for the caller. + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + A handle to a Condition Variable + + + + diff --git a/reference/pthreads/cond/destroy.xml b/reference/pthreads/cond/destroy.xml new file mode 100644 index 0000000000..8a49ee4e17 --- /dev/null +++ b/reference/pthreads/cond/destroy.xml @@ -0,0 +1,72 @@ + + + + + + Cond::destroy + Destroy a handle to a Condition Variable and free the associated resources + + + + &reftitle.description; + + final + public + static + boolean + Cond::destroy + + long + condition + + + + Destroying Condition Variable handles must be carried out explicitly by the programmer when they are finished with the Condition Variable. + No Threads should be blocking on a call to Cond::wait when the call to Cond::destroy takes place. + + + + + &reftitle.parameters; + + + condition + + + A handle to a Condition Variable returned by a previous call to Cond::create + + + + + + + + &reftitle.returnvalues; + + A boolean indication of success. + + + + + + + diff --git a/reference/pthreads/cond/signal.xml b/reference/pthreads/cond/signal.xml new file mode 100644 index 0000000000..35a841e791 --- /dev/null +++ b/reference/pthreads/cond/signal.xml @@ -0,0 +1,67 @@ + + + + + + Cond::signal + Signal a condition to a single Thread + + + + &reftitle.description; + + final + public + static + boolean + Cond::signal + + long + condition + + + + + + + + + &reftitle.parameters; + + + condition + + A handle returned by a previous call to Cond::create + + + + + + + &reftitle.returnvalues; + A boolean indication of success. + + + + + + diff --git a/reference/pthreads/cond/wait.xml b/reference/pthreads/cond/wait.xml new file mode 100644 index 0000000000..a281527c59 --- /dev/null +++ b/reference/pthreads/cond/wait.xml @@ -0,0 +1,84 @@ + + + + + + Cond::wait + Wait for a signal on a Condition Variable + + + + &reftitle.description; + + final + public + static + boolean + Cond::wait + + long + condition + + + long + mutex + + + long + timeout + + + Wait for a signal on a Condition Variable, optionally specifying a timeout to limit waiting time. + + + + &reftitle.parameters; + + + condition + + A handle returned by a previous call to Cond::create. + + + + mutex + + A handle returned by a previous call to Mutex::create and owned (locked) by the caller. + + + + timeout + + An optional timeout, in microseconds ( millionths of a second ). + + + + + + + &reftitle.returnvalues; + A boolean indication of success. + + + + + diff --git a/reference/pthreads/configure.xml b/reference/pthreads/configure.xml new file mode 100644 index 0000000000..5e0fe35fa6 --- /dev/null +++ b/reference/pthreads/configure.xml @@ -0,0 +1,35 @@ + + + +
+ &reftitle.install; + + + &pecl.info; + &url.pecl.package;pthreads + + + +
+ + + diff --git a/reference/pthreads/ini.xml b/reference/pthreads/ini.xml new file mode 100644 index 0000000000..3229ab3c3f --- /dev/null +++ b/reference/pthreads/ini.xml @@ -0,0 +1,69 @@ + + + +
+ &reftitle.runtime; + &extension.runtime; + + + pthreads &ConfigureOptions; + + + + &Name; + &Default; + &Changeable; + &Changelog; + + + + + pthreads.max + 0 + PHP_INI_SYSTEM + + + + +
+
+ + &ini.descriptions.title; + + + + + + pthreads.max + integer + + + + provides system administrators a way to limit the amount of objects an instance of PHP can create. + + + + + +
+ + diff --git a/reference/pthreads/modifiers.xml b/reference/pthreads/modifiers.xml new file mode 100644 index 0000000000..b5ca9e7aac --- /dev/null +++ b/reference/pthreads/modifiers.xml @@ -0,0 +1,85 @@ + + + + + Method Modifiers + Modifiers + + pthreads overrides the functionality of the protected and private method modifiers in order to provide functionality more suited to multi-threaded objects. + pthreads applies this functionality to all Thread, Worker and Stackable objects from creation. + + + protected method example: protected methods can only be executed by one Thread at a time. + +synchronized()) { + + } + } + + protected function synchronized() { + /* synchronized method */ + } +} + +$thread = new ExampleThread(); +if ($thread->start()) { + $thread->synchronized(); +} +?> +]]> + + + + private method example: private methods may only be executed by the Thread, Worker, or Stackable during execution + +insideonly()) { + + } + } + + private function insideonly() { + /* private method */ + } +} + +$thread = new ExampleThread(); +if ($thread->start()) { + $thread->insideonly(); +} +?> +]]> + + + + + + diff --git a/reference/pthreads/mutex.xml b/reference/pthreads/mutex.xml new file mode 100644 index 0000000000..b7cdef2b61 --- /dev/null +++ b/reference/pthreads/mutex.xml @@ -0,0 +1,67 @@ + + + + + + The Mutex class + Mutex + + + + +
+ &reftitle.intro; + + The static methods contained in the Mutex class provide direct access to Posix Mutex functionality. + +
+ + +
+ &reftitle.classsynopsis; + + + + Mutex + + + + + Mutex + + + + + &Methods; + + + + +
+ +
+ + &reference.pthreads.entities.mutex; + +
+ + diff --git a/reference/pthreads/mutex/create.xml b/reference/pthreads/mutex/create.xml new file mode 100644 index 0000000000..1cb004713f --- /dev/null +++ b/reference/pthreads/mutex/create.xml @@ -0,0 +1,63 @@ + + + + + + Mutex::create + Create a new Mutex + + + + &reftitle.description; + + final + public + static + long + Mutex::create + + boolean + lock + + + Create, and optionally lock a new Mutex for the caller + + + + &reftitle.parameters; + + + lock + + Setting lock to true will lock the Mutex for the caller before returning the handle + + + + + + + &reftitle.returnvalues; + A newly created and optionally locked Mutex handle + + + + diff --git a/reference/pthreads/mutex/destroy.xml b/reference/pthreads/mutex/destroy.xml new file mode 100644 index 0000000000..75361d6995 --- /dev/null +++ b/reference/pthreads/mutex/destroy.xml @@ -0,0 +1,68 @@ + + + + + + Mutex::destroy + To destroy a handle to a Mutex and free the associated resources + + + + &reftitle.description; + + final + public + static + boolean + Mutex::destroy + + long + mutex + + + Destroying Mutex handles must be carried out explicitly by the programmer when they are finished with the Mutex handle. + + + + &reftitle.parameters; + + + mutex + + + A handle returned by a previous call to Mutex::create. + The handle should not be locked by any Thread when Mutex::destroy is called. + + + + + + + + &reftitle.returnvalues; + A boolean indication of success + + + + + + diff --git a/reference/pthreads/mutex/lock.xml b/reference/pthreads/mutex/lock.xml new file mode 100644 index 0000000000..09427c25d1 --- /dev/null +++ b/reference/pthreads/mutex/lock.xml @@ -0,0 +1,66 @@ + + + + + + Mutex::lock + The lock purpose + + + + &reftitle.description; + + final + public + static + boolean + Mutex::lock + + long + mutex + + + Attempt to lock the Mutex for the caller. + An attempt to lock a Mutex owned (locked) by another Thread will result in blocking. + + + + &reftitle.parameters; + + + mutex + + A handle returned by a previous call to Mutex::create. + + + + + + + &reftitle.returnvalues; + A boolean indication of success. + + + + + + diff --git a/reference/pthreads/mutex/trylock.xml b/reference/pthreads/mutex/trylock.xml new file mode 100644 index 0000000000..3e439201aa --- /dev/null +++ b/reference/pthreads/mutex/trylock.xml @@ -0,0 +1,65 @@ + + + + + + Mutex::trylock + To attempt to lock a Mutex without blocking. + + + + &reftitle.description; + + final + public + static + boolean + Mutex::trylock + + long + mutex + + + Attempt to lock the Mutex for the caller without blocking if the Mutex is owned (locked) by another Thread. + + + + &reftitle.parameters; + + + mutex + + A handle returned by a previous call to Mutex::create. + + + + + + + &reftitle.returnvalues; + + A boolean indication of success. + + + + + diff --git a/reference/pthreads/mutex/unlock.xml b/reference/pthreads/mutex/unlock.xml new file mode 100644 index 0000000000..94bfddce20 --- /dev/null +++ b/reference/pthreads/mutex/unlock.xml @@ -0,0 +1,78 @@ + + + + + + Mutex::unlock + Attempts to unlock a Mutex + + + + &reftitle.description; + + final + public + static + boolean + Mutex::unlock + + long + mutex + + + boolean + destroy + + + + Attempts to unlock the Mutex for the caller, optionally destroying the Mutex handle. + The calling thread should own the Mutex at the time of the call. + + + + + &reftitle.parameters; + + + mutex + + A handle returned by a previous call to Mutex::create. + + + + destroy + + When true pthreads will destroy the Mutex after a successful unlock. + + + + + + + &reftitle.returnvalues; + A boolean indication of success. + + + + + + diff --git a/reference/pthreads/reference.xml b/reference/pthreads/reference.xml new file mode 100644 index 0000000000..bfec3d2e38 --- /dev/null +++ b/reference/pthreads/reference.xml @@ -0,0 +1,30 @@ + + + + + pthreads &Functions; + + &reference.pthreads.entities.functions; + + + + diff --git a/reference/pthreads/setup.xml b/reference/pthreads/setup.xml new file mode 100644 index 0000000000..3272c6bba6 --- /dev/null +++ b/reference/pthreads/setup.xml @@ -0,0 +1,52 @@ + + + + + &reftitle.setup; + +
+ &reftitle.required; + + pthreads requires a build of PHP with ZTS enabled ( --enable-maintainer-zts or --enable-zts on Windows ) + +
+ +
+ &reftitle.install; + &no.install; +
+ +
+ &reftitle.runtime; + &no.config; +
+ +
+ &reftitle.resources; + + + +
+ +
+ + diff --git a/reference/pthreads/stackable.xml b/reference/pthreads/stackable.xml new file mode 100644 index 0000000000..d41df970c3 --- /dev/null +++ b/reference/pthreads/stackable.xml @@ -0,0 +1,67 @@ + + + + + + The Stackable class + Stackable + + + + +
+ &reftitle.intro; + + Stackables are tasks that are executed by Worker threads. You can synchronize with, read, and write Stackable objects before, after and during their execution. + +
+ + +
+ &reftitle.classsynopsis; + + + + Stackable + + + + + Stackable + + + + + &Methods; + + + + +
+ +
+ + &reference.pthreads.entities.stackable; + +
+ + diff --git a/reference/pthreads/stackable/isrunning.xml b/reference/pthreads/stackable/isrunning.xml new file mode 100644 index 0000000000..0f6f103ae9 --- /dev/null +++ b/reference/pthreads/stackable/isrunning.xml @@ -0,0 +1,55 @@ + + + + + + Stackable::isRunning + State Detection + + + + &reftitle.description; + + final public booleanStackable::isRunning + + + + A Stackable is running when a Worker Thread is executing it + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/stackable/iswaiting.xml b/reference/pthreads/stackable/iswaiting.xml new file mode 100644 index 0000000000..bb729c377f --- /dev/null +++ b/reference/pthreads/stackable/iswaiting.xml @@ -0,0 +1,55 @@ + + + + + + Stackable::isWaiting + State Detection + + + + &reftitle.description; + + final public booleanStackable::isWaiting + + + + Tell if the referenced Stackable is waiting for notification + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/stackable/notify.xml b/reference/pthreads/stackable/notify.xml new file mode 100644 index 0000000000..7aff323b61 --- /dev/null +++ b/reference/pthreads/stackable/notify.xml @@ -0,0 +1,55 @@ + + + + + + Stackable::notify + Synchronization + + + + &reftitle.description; + + final public booleanStackable::notify + + + + Sends notification to a Stackable that is waiting + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/stackable/run.xml b/reference/pthreads/stackable/run.xml new file mode 100644 index 0000000000..0ac84e3b8d --- /dev/null +++ b/reference/pthreads/stackable/run.xml @@ -0,0 +1,55 @@ + + + + + + Stackable::run + Execution + + + + &reftitle.description; + + abstract public voidStackable::run + + + + The run method of a Stackable is executed by the Worker Thread + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The methods return value, if used, will be ignored + + + + + + + diff --git a/reference/pthreads/stackable/wait.xml b/reference/pthreads/stackable/wait.xml new file mode 100644 index 0000000000..fd689e7ba3 --- /dev/null +++ b/reference/pthreads/stackable/wait.xml @@ -0,0 +1,64 @@ + + + + + + Stackable::wait + Synchronization + + + + &reftitle.description; + + final public booleanStackable::wait + stringtimeout + + + Waits for notification from the Stackable + + + + + &reftitle.parameters; + + + timeout + + + An optional timeout in millionths of a second. + + + + + + + + &reftitle.returnvalues; + + A boolean indication of success + + + + + + + diff --git a/reference/pthreads/thread.xml b/reference/pthreads/thread.xml new file mode 100644 index 0000000000..f1d02f24b6 --- /dev/null +++ b/reference/pthreads/thread.xml @@ -0,0 +1,67 @@ + + + + + + The Thread class + Thread + + + + +
+ &reftitle.intro; + + An implementation of a Thread should extend this declaration, implementing the run method. When the start method of that object is called, the run method code will be executed in separate Thread. + +
+ + +
+ &reftitle.classsynopsis; + + + + Thread + + + + + Thread + + + + + &Methods; + + + + +
+ +
+ + &reference.pthreads.entities.thread; + +
+ + diff --git a/reference/pthreads/thread/getcreatorid.xml b/reference/pthreads/thread/getcreatorid.xml new file mode 100644 index 0000000000..106ad6ad3b --- /dev/null +++ b/reference/pthreads/thread/getcreatorid.xml @@ -0,0 +1,55 @@ + + + + + + Thread::getCreatorId + Identification + + + + &reftitle.description; + + final public longThread::getCreatorId + + + + Will return the identity of the Thread that created the referenced Thread + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A numeric identity + + + + + + + diff --git a/reference/pthreads/thread/getthreadid.xml b/reference/pthreads/thread/getthreadid.xml new file mode 100644 index 0000000000..945743fb1c --- /dev/null +++ b/reference/pthreads/thread/getthreadid.xml @@ -0,0 +1,53 @@ + + + + + + Thread::getThreadId + Identification + + + + &reftitle.description; + + final public longThread::getThreadId + + + + Will return the identity of the referenced Thread + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A numeric identity + + + + + diff --git a/reference/pthreads/thread/isjoined.xml b/reference/pthreads/thread/isjoined.xml new file mode 100644 index 0000000000..614597e776 --- /dev/null +++ b/reference/pthreads/thread/isjoined.xml @@ -0,0 +1,55 @@ + + + + + + Thread::isJoined + State Detection + + + + &reftitle.description; + + final public booleanThread::isJoined + + + + Tell if the referenced Thread has been joined by another context + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/thread/isrunning.xml b/reference/pthreads/thread/isrunning.xml new file mode 100644 index 0000000000..1f58807e5c --- /dev/null +++ b/reference/pthreads/thread/isrunning.xml @@ -0,0 +1,60 @@ + + + + + + Thread::isRunning + State Detection + + + + &reftitle.description; + + final public booleanThread::isRunning + + + + Tell if the referenced Thread is executing + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + A Thread is considered running while executing the run method + + + + + + + + + diff --git a/reference/pthreads/thread/isstarted.xml b/reference/pthreads/thread/isstarted.xml new file mode 100644 index 0000000000..86109a2dbb --- /dev/null +++ b/reference/pthreads/thread/isstarted.xml @@ -0,0 +1,55 @@ + + + + + + Thread::isStarted + State Detection + + + + &reftitle.description; + + final public booleanThread::isStarted + + + + Tell if the referenced Thread has been started + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/thread/iswaiting.xml b/reference/pthreads/thread/iswaiting.xml new file mode 100644 index 0000000000..8e399686bd --- /dev/null +++ b/reference/pthreads/thread/iswaiting.xml @@ -0,0 +1,55 @@ + + + + + + Thread::isWaiting + State Detection + + + + &reftitle.description; + + final public booleanThread::isWaiting + + + + Tell if the referenced Thread is waiting for notification + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/thread/join.xml b/reference/pthreads/thread/join.xml new file mode 100644 index 0000000000..cf0b682802 --- /dev/null +++ b/reference/pthreads/thread/join.xml @@ -0,0 +1,55 @@ + + + + + + Thread::join + Synchronization + + + + &reftitle.description; + + final public booleanThread::join + + + + Causes the calling context to wait for the referenced Thread to finish executing + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + + + + + + + diff --git a/reference/pthreads/thread/notify.xml b/reference/pthreads/thread/notify.xml new file mode 100644 index 0000000000..c28683fbd0 --- /dev/null +++ b/reference/pthreads/thread/notify.xml @@ -0,0 +1,55 @@ + + + + + + Thread::notify + Synchronization + + + + &reftitle.description; + + final public booleanThread::notify + + + + Send notification to the referenced Thread + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of success + + + + + + + diff --git a/reference/pthreads/thread/run.xml b/reference/pthreads/thread/run.xml new file mode 100644 index 0000000000..935ca6f831 --- /dev/null +++ b/reference/pthreads/thread/run.xml @@ -0,0 +1,55 @@ + + + + + + Thread::run + Execution + + + + &reftitle.description; + + abstract public voidThread::run + + + + The run method of a Thread is executed in a Thread when a call to Thread::start is made + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The methods return value, if used, will be ignored + + + + + + + diff --git a/reference/pthreads/thread/start.xml b/reference/pthreads/thread/start.xml new file mode 100644 index 0000000000..5a9ab83d7d --- /dev/null +++ b/reference/pthreads/thread/start.xml @@ -0,0 +1,55 @@ + + + + + + Thread::start + Execution + + + + &reftitle.description; + + final public booleanThread::start + + + + Will start a new Thread to execute the implemented run method + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of success + + + + + + + diff --git a/reference/pthreads/thread/wait.xml b/reference/pthreads/thread/wait.xml new file mode 100644 index 0000000000..e551b1d65c --- /dev/null +++ b/reference/pthreads/thread/wait.xml @@ -0,0 +1,62 @@ + + + + + + Thread::wait + Synchronization + + + + &reftitle.description; + + final public booleanThread::wait + longtimeout + + + Will cause the calling Thread to wait for notification from the referenced Thread + + + + + &reftitle.parameters; + + + timeout + + + An optional timeout in millionths of a second + + + + + + + + &reftitle.returnvalues; + + A boolean indication of success + + + + + diff --git a/reference/pthreads/versions.xml b/reference/pthreads/versions.xml new file mode 100644 index 0000000000..b393c4260a --- /dev/null +++ b/reference/pthreads/versions.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/reference/pthreads/worker.xml b/reference/pthreads/worker.xml new file mode 100644 index 0000000000..914dc810f6 --- /dev/null +++ b/reference/pthreads/worker.xml @@ -0,0 +1,67 @@ + + + + + + The Worker class + Worker + + + + +
+ &reftitle.intro; + + Worker Threads have a persistent context, as such should be used over Threads in most cases. + +
+ + +
+ &reftitle.classsynopsis; + + + + Worker + + + + + Worker + + + + + &Methods; + + + + +
+ +
+ + &reference.pthreads.entities.worker; + +
+ + diff --git a/reference/pthreads/worker/getcreatorid.xml b/reference/pthreads/worker/getcreatorid.xml new file mode 100644 index 0000000000..f5cd85a03e --- /dev/null +++ b/reference/pthreads/worker/getcreatorid.xml @@ -0,0 +1,55 @@ + + + + + + Worker::getCreatorId + Identification + + + + &reftitle.description; + + final public longWorker::getCreatorId + + + + Will return the identity of the Thread that created the referenced Thread + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A numeric identity + + + + + + + diff --git a/reference/pthreads/worker/getstacked.xml b/reference/pthreads/worker/getstacked.xml new file mode 100644 index 0000000000..db3208fb0d --- /dev/null +++ b/reference/pthreads/worker/getstacked.xml @@ -0,0 +1,55 @@ + + + + + + Worker::getStacked + Stack Analysis + + + + &reftitle.description; + + final public intWorker::getStacked + + + + Returns the number of Stackables waiting to be executed by the referenced Worker + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An integral value + + + + + + + diff --git a/reference/pthreads/worker/getthreadid.xml b/reference/pthreads/worker/getthreadid.xml new file mode 100644 index 0000000000..1e4f5b5b12 --- /dev/null +++ b/reference/pthreads/worker/getthreadid.xml @@ -0,0 +1,55 @@ + + + + + + Worker::getThreadId + Identification + + + + &reftitle.description; + + final public longWorker::getThreadId + + + + Will return the identity of the referenced Worker + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A numeric identity + + + + + + + diff --git a/reference/pthreads/worker/isshutdown.xml b/reference/pthreads/worker/isshutdown.xml new file mode 100644 index 0000000000..29651475c1 --- /dev/null +++ b/reference/pthreads/worker/isshutdown.xml @@ -0,0 +1,55 @@ + + + + + + Worker::isShutdown + State Detection + + + + &reftitle.description; + + final public booleanWorker::isShutdown + + + + Tell if the referenced Worker has been shutdown + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/worker/isworking.xml b/reference/pthreads/worker/isworking.xml new file mode 100644 index 0000000000..16bdfcaeec --- /dev/null +++ b/reference/pthreads/worker/isworking.xml @@ -0,0 +1,55 @@ + + + + + + Worker::isWorking + State Detection + + + + &reftitle.description; + + final public booleanWorker::isWorking + + + + Tell if a Worker is executing Stackables + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of state + + + + + + + diff --git a/reference/pthreads/worker/run.xml b/reference/pthreads/worker/run.xml new file mode 100644 index 0000000000..abea43ffa8 --- /dev/null +++ b/reference/pthreads/worker/run.xml @@ -0,0 +1,55 @@ + + + + + + Worker::run + Execution + + + + &reftitle.description; + + abstract public voidWorker::run + + + + The run method should prepare the Workers members ( and resources ) - Stackables have access to the Worker and it's methods/members/resources during execution + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The methods return value, if used, will be ignored + + + + + + + diff --git a/reference/pthreads/worker/shutdown.xml b/reference/pthreads/worker/shutdown.xml new file mode 100644 index 0000000000..122de89d44 --- /dev/null +++ b/reference/pthreads/worker/shutdown.xml @@ -0,0 +1,53 @@ + + + + + + Worker::shutdown + Synchronization + + + + &reftitle.description; + + final public booleanWorker::shutdown + + + + Shuts down the Worker after executing all the Stackables previously stacked + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + + + + + diff --git a/reference/pthreads/worker/stack.xml b/reference/pthreads/worker/stack.xml new file mode 100644 index 0000000000..487e48dca7 --- /dev/null +++ b/reference/pthreads/worker/stack.xml @@ -0,0 +1,64 @@ + + + + + + Worker::stack + Stacking + + + + &reftitle.description; + + final public intWorker::stack + Stackablework + + + Appends the referenced Stackable to the stack of the referenced Worker + + + + + &reftitle.parameters; + + + work + + + An object of type Stackable to be executed by the referenced Worker + + + + + + + + &reftitle.returnvalues; + + The new length of the stack + + + + + + + diff --git a/reference/pthreads/worker/start.xml b/reference/pthreads/worker/start.xml new file mode 100644 index 0000000000..371eb96e64 --- /dev/null +++ b/reference/pthreads/worker/start.xml @@ -0,0 +1,55 @@ + + + + + + Worker::start + Execution + + + + &reftitle.description; + + final public booleanWorker::start + + + + Will start a new Thread, executing Worker::run and then waiting for Stackables + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A boolean indication of success + + + + + + + diff --git a/reference/pthreads/worker/unstack.xml b/reference/pthreads/worker/unstack.xml new file mode 100644 index 0000000000..ad4df2e004 --- /dev/null +++ b/reference/pthreads/worker/unstack.xml @@ -0,0 +1,64 @@ + + + + + + Worker::unstack + Stacking + + + + &reftitle.description; + + final public intWorker::unstack + Stackablework + + + Removes the referenced Stackable ( or all Stackables if parameters are void ) from stack of the referenced Worker + + + + + &reftitle.parameters; + + + work + + + An object of type Stackable + + + + + + + + &reftitle.returnvalues; + + The new length of the stack + + + + + + +