pthreads Worker::unstack
(PECL pthreads >= 2.0.0)
Worker::unstack — Unstacking work
설명
public Worker::unstack(): int
스택에서 첫 번째 작업(가장 오래된 작업)을 제거합니다.
매개변수
이 함수에는 매개변수가 없습니다.
반환 값
The new size of the stack.
변경 로그
버전 | 설명 |
---|---|
v3 | 스택을 해제할 작업을 지정하는 매개변수가 제거되었습니다. 이제 스택의 첫 번째 작업만 제거됩니다. |
Examples
예제 #1 Removing objects from the stack of Workers
<?php
$my = new Worker();
$work = new class extends Threaded {};
var_dump($my->stack($work));
var_dump($my->unstack());
위의 예는 다음을 출력합니다.
int(1) int(0)