diff --git a/reference/pthreads/pool/submit.xml b/reference/pthreads/pool/submit.xml index b6702f6611..e498355af5 100644 --- a/reference/pthreads/pool/submit.xml +++ b/reference/pthreads/pool/submit.xml @@ -35,7 +35,7 @@ &reftitle.returnvalues; - the length of the stack on the selected Worker + the identifier of the Worker executing the Stackable diff --git a/reference/pthreads/pool/submitTo.xml b/reference/pthreads/pool/submitTo.xml new file mode 100644 index 0000000000..adbfb66330 --- /dev/null +++ b/reference/pthreads/pool/submitTo.xml @@ -0,0 +1,148 @@ + + + + + + Pool::submitTo + Submits a Stackable for execution + + + + &reftitle.description; + + public intPool::submitTo + intworker + Stackabletask + + + Submit the task to the specified Worker in the Pool + + + + + &reftitle.parameters; + + + worker + + + The worker for execution + + + + + size + + + The task for execution + + + + + + + + &reftitle.returnvalues; + + the identifier of the Worker executing the Stackable + + + + + &reftitle.examples; + + + Submitting Tasks + +something = $something; + } + + public function run() { + /** ... **/ + } +} + +$pool = new Pool(8, \MyWorker::class, [new Something()]); +$pool->submit(new MyWork()); +var_dump($pool); +?> +]]> + + &example.outputs; + + + int(8) + ["class":protected]=> + string(8) "MyWorker" + ["workers":protected]=> + array(1) { + [0]=> + object(MyWorker)#4 (1) { + ["something"]=> + object(Something)#5 (0) { + } + } + } + ["work":protected]=> + array(1) { + [0]=> + object(MyWork)#3 (1) { + ["worker"]=> + object(MyWorker)#5 (1) { + ["something"]=> + object(Something)#6 (0) { + } + } + } + } + ["ctor":protected]=> + array(1) { + [0]=> + object(Something)#2 (0) { + } + } + ["last":protected]=> + int(1) +} +]]> + + + + + + + + diff --git a/reference/pthreads/versions.xml b/reference/pthreads/versions.xml index d88b6f5bb8..53d9239bb4 100644 --- a/reference/pthreads/versions.xml +++ b/reference/pthreads/versions.xml @@ -64,6 +64,7 @@ +