
- PHP Tutorial
- PHP - Home
- PHP - Introduction
- PHP - Environment Setup
- PHP - Syntax Overview
- PHP - Variable Types
- PHP - Constants
- PHP - Operator Types
- PHP - Decision Making
- PHP - Loop Types
- PHP - Arrays
- PHP - Strings
- PHP - Web Concepts
- PHP - GET & POST
- PHP - File Inclusion
- PHP - Files & I/O
- PHP - Functions
- PHP - Cookies
- PHP - Sessions
- PHP - Sending Emails
- PHP - File Uploading
- PHP - Coding Standard
- Advanced PHP
- PHP - Predefined Variables
- PHP - Regular Expression
- PHP - Error Handling
- PHP - Bugs Debugging
- PHP - Date & Time
- PHP & MySQL
- PHP & AJAX
- PHP & XML
- PHP - Object Oriented
- PHP - For C Developers
- PHP - For PERL Developers
- PHP Form Examples
- PHP - Form Introduction
- PHP - Validation Example
- PHP - Complete Form
- PHP login Examples
- PHP - Login Example
- PHP - Facebook Login
- PHP - Paypal Integration
- PHP - MySQL Login
- PHP AJAX Examples
- PHP - AJAX Search
- PHP - AJAX XML Parser
- PHP - AJAX Auto Complete Search
- PHP - AJAX RSS Feed Example
- PHP XML Example
- PHP - XML Introduction
- PHP - Simple XML
- PHP - Simple XML GET
- PHP - SAX Parser Example
- PHP - DOM Parser Example
- PHP Frame Works
- PHP - Frame Works
- PHP - Core PHP vs Frame Works
- PHP Design Patterns
- PHP - Design Patterns
- PHP Function Reference
- PHP - Built-In Functions
- PHP Useful Resources
- PHP - Questions & Answers
- PHP - Useful Resources
- PHP - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
PHP - Threaded Functions
The Threaded class
The Threaded objects form the basis of pthreads ability to execute user code in parallel. They can expose synchronization methods and various interfaces.
Threaded objects can provide implicit safety for a programmer. All operations on the object scope are safe.
Class synopsis
Threaded implements Collectable , Traversable , Countable , ArrayAccess { /* Methods */ public array chunk( integer $size , boolean $preserve ) public integer count( void ) public bool extend( string $class ) public Threaded from( Closure $run [, Closure $construct [, array $args ]] ) public array getTerminationInfo( void ) public boolean isRunning( void ) public boolean isTerminated( void ) public boolean isWaiting( void ) public boolean lock( void ) public boolean merge( mixed $from [, bool $overwrite ] ) public boolean notify( void ) public boolean notifyOne( void ) public boolean pop( void ) public void run( void ) public mixed shift( void ) public mixed synchronized( Closure $block [, mixed $... ] ) public boolean unlock( void ) public boolean wait([ integer $timeout ] ) }
Sr.No | Function & Description |
---|---|
1 |
Function can fetch a chunk of objects property table of a given size, optionally preserving keys. |
2 |
Function can return the number of properties for this object, and doesn't have any parameters. |
3 |
Function can make a thread-safe standard class at runtime. |
4 |
Function can create an anonymous Threaded object from closures. |
5 | Threaded::getTerminationInfo() Function can retrieve terminal error information from a referenced object. |
6 |
Function can tell if a referenced object is executing. |
7 |
Function tell if a referenced object is terminated during execution, suffered fatal errors, or throw uncaught exceptions. |
8 |
Function can tell if a referenced object is waiting for the notification. |
9 |
Function can lock a referenced objects property table. |
10 |
Function can merge the data into a current object. |
11 |
Function can send a notification to referenced object. |
12 |
Function can send a notification to referenced object. |
13 |
Function can pop an item from objects property table. |
14 |
Function can always implement a run method for objects that are intended for execution. |
15 |
Function can shift an item from the objects property table. |
16 |
Function can return a value from the block. |
17 |
Function can unlock the referenced objects storage for calling context. |
18 |
Function cause calling context to wait for notification from the referenced object. |