GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
Threaded Class Reference

Public Member Functions

 chunk ($size, bool $preserve=false)
 
 count ()
 
 isRunning ()
 
 isTerminated ()
 
 merge ($from, $overwrite=true)
 
 notify ()
 
 notifyOne ()
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 pop ()
 
 run ()
 
 shift ()
 
 synchronized (\Closure $function, $args=null)
 
 wait ($timeout)
 
 getRefCount ()
 
 addRef ()
 
 delRef ()
 
 isGarbage ()
 

Static Public Member Functions

static extend ($obj)
 

Detailed Description

Threaded class

Threaded objects form the basis of pthreads ability to execute user code asynchronously; they expose and include synchronization methods and various useful interfaces.

Threaded objects, most importantly, provide implicit safety for the programmer; all operations on the object scope are safe.

2.0.0

Member Function Documentation

◆ addRef()

addRef ( )
217 {}

◆ chunk()

chunk (   $size,
bool  $preserve = false 
)

Fetches a chunk of the objects properties table of the given size

Parameters
int$sizeThe number of items to fetch
bool$preservedefault false
Returns
array An array of items from the objects member table http://www.php.net/manual/en/threaded.chunk.php
103 {}

◆ count()

count ( )

{}

108 {}

◆ delRef()

delRef ( )
219 {}

◆ extend()

static extend (   $obj)
static
Parameters
object$obj
91  {
92 
93  }

◆ getRefCount()

getRefCount ( )
Returns
int
215 {}

◆ isGarbage()

isGarbage ( )
Returns
bool

Implements Collectable.

224 {}

◆ isRunning()

isRunning ( )

Tell if the referenced object is executing

bool A boolean indication of state

116 {}

◆ isTerminated()

isTerminated ( )

Tell if the referenced object exited, suffered fatal errors, or threw uncaught exceptions during execution

bool A boolean indication of state

124 {}

◆ merge()

merge (   $from,
  $overwrite = true 
)

Merges data into the current object

Parameters
mixed$fromThe data to merge
bool$overwriteOverwrite existing keys flag, by default true

bool A boolean indication of success

135 {}

◆ notify()

notify ( )

Send notification to the referenced object

bool A boolean indication of success

143 {}

◆ notifyOne()

notifyOne ( )
145 {}

◆ offsetExists()

offsetExists (   $offset)

{}

160 {}

◆ offsetGet()

offsetGet (   $offset)

{}

150 {}

◆ offsetSet()

offsetSet (   $offset,
  $value 
)

{}

155 {}

◆ offsetUnset()

offsetUnset (   $offset)

{}

165 {}

◆ pop()

pop ( )

Pops an item from the objects property table

mixed The last item from the objects properties table

173 {}

◆ run()

run ( )

The programmer should always implement the run method for objects that are intended for execution.

void The methods return value, if used, will be ignored

181 {}

◆ shift()

shift ( )

Shifts an item from the objects properties table

mixed The first item from the objects properties table

189 {}

◆ synchronized()

synchronized ( \Closure  $function,
  $args = null 
)

Executes the block while retaining the synchronization lock for the current context.

Parameters
\Closure$functionThe block of code to execute
mixed$args... Variable length list of arguments to use as function arguments to the block

mixed The return value from the block

200 {}

◆ wait()

wait (   $timeout)

Waits for notification from the Stackable

Parameters
int$timeoutAn optional timeout in microseconds

bool A boolean indication of success

210 {}

The documentation for this class was generated from the following file: