
- 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 - Thread Functions
The Thread class
Whenever a start method of the Thread class invoked, the run method code can be executed in a separate thread parallelly.
Class synopsis
Thread extends Threaded implements Countable , Traversable , ArrayAccess { /* Methods */ public void detach ( void ) public integer getCreatorId ( void ) public static Thread getCurrentThread ( void ) public static integer getCurrentThreadId ( void ) public integer getThreadId ( void ) public static mixed globally ( void ) public boolean isJoined ( void ) public boolean isStarted ( void ) public boolean join ( void ) public void kill ( void ) public boolean start ([ integer $options ] ) /* Inherited methods */ public array Threaded::chunk ( integer $size , boolean $preserve ) public integer Threaded::count ( void ) public bool Threaded::extend ( string $class ) public Threaded Threaded::from ( Closure $run [, Closure $construct [, array $args ]] ) public array Threaded::getTerminationInfo ( void ) public boolean Threaded::isRunning ( void ) public boolean Threaded::isTerminated ( void ) public boolean Threaded::isWaiting ( void ) public boolean Threaded::lock ( void ) public boolean Threaded::merge ( mixed $from [, bool $overwrite ] ) public boolean Threaded::notify ( void ) public boolean Threaded::notifyOne ( void ) public boolean Threaded::pop ( void ) public void Threaded::run ( void ) public mixed Threaded::shift ( void ) public mixed Threaded::synchronized ( Closure $block [, mixed $... ] ) public boolean Threaded::unlock ( void ) public boolean Threaded::wait ([ integer $timeout ] ) }
Sr.No | Function & Description |
---|---|
1 |
Function can detach a referenced Thread from the calling context, dangerous! |
2 |
Function can return an identity of Thread that created a referenced Thread. |
3 |
Function can return a reference to currently executing Thread. |
4 |
Function can return the identity of currently executing Thread. |
5 |
Function can return an identity of referenced Thread. |
6 |
Function can execute Callable in a global scope. |
7 |
Function can tell if the referenced Thread has been joined. |
8 |
Function can tell if a referenced Thread was started. |
9 |
Function can cause the calling context to wait for a referenced Thread to finish executing. |
10 |
Function can force a referenced Thread to terminate. |
11 |
Function can start a new thread to execute an implemented run method. |