PHP 클래스 pocketmine\scheduler\AsyncTask

WARNING: Do not call PocketMine-MP API methods, or save objects from/on other Threads!!
상속: extends Collectable
파일 보기 프로젝트 열기: iTXTech/Genisys 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$worker AsyncWorker

공개 메소드들

메소드 설명
cancelRun ( )
cleanObject ( )
getFromThreadStore ( string $identifier ) : mixed Gets something into the local thread store.
getResult ( ) : mixed
getTaskId ( )
hasCancelledRun ( )
hasResult ( ) : boolean
isCrashed ( )
isFinished ( ) : boolean
isGarbage ( ) : boolean
onCompletion ( Server $server ) : void Actions to execute when completed (on main thread) Implement this if you want to handle the data in your AsyncTask after it has been processed
onRun ( ) : void Actions to execute when run
run ( )
saveToThreadStore ( string $identifier, mixed $value ) Saves something into the local thread store.
setGarbage ( )
setResult ( mixed $result, boolean $serialize = true )
setTaskId ( $taskId )

메소드 상세

cancelRun() 공개 메소드

public cancelRun ( )

cleanObject() 공개 메소드

public cleanObject ( )

getFromThreadStore() 공개 메소드

You have to initialize this in some way from the task on run
public getFromThreadStore ( string $identifier ) : mixed
$identifier string
리턴 mixed

getResult() 공개 메소드

public getResult ( ) : mixed
리턴 mixed

getTaskId() 공개 메소드

public getTaskId ( )

hasCancelledRun() 공개 메소드

public hasCancelledRun ( )

hasResult() 공개 메소드

public hasResult ( ) : boolean
리턴 boolean

isCrashed() 공개 메소드

public isCrashed ( )

isFinished() 공개 메소드

public isFinished ( ) : boolean
리턴 boolean

isGarbage() 공개 메소드

public isGarbage ( ) : boolean
리턴 boolean

onCompletion() 공개 메소드

Actions to execute when completed (on main thread) Implement this if you want to handle the data in your AsyncTask after it has been processed
public onCompletion ( Server $server ) : void
$server pocketmine\Server
리턴 void

onRun() 추상적인 공개 메소드

Actions to execute when run
abstract public onRun ( ) : void
리턴 void

run() 공개 메소드

public run ( )

saveToThreadStore() 공개 메소드

This might get deleted at any moment.
public saveToThreadStore ( string $identifier, mixed $value )
$identifier string
$value mixed

setGarbage() 공개 메소드

public setGarbage ( )

setResult() 공개 메소드

public setResult ( mixed $result, boolean $serialize = true )
$result mixed
$serialize boolean

setTaskId() 공개 메소드

public setTaskId ( $taskId )

프로퍼티 상세

$worker 공개적으로 프로퍼티

public AsyncWorker,pocketmine\scheduler $worker
리턴 AsyncWorker