PHP Developer's Network : Network Member
Forums

PHP Classes
Icontem

Class: Thread


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend!
      Classes of Luca Mariano  >  Thread  >  Download  >  Support forum Support forum  >  RSS 1.0 feed RSS 2.0 feed Latest changes  >  Stumble It! Stumble It!  >  Bookmark in del.icio.us Bookmark in del.icio.us  
  Supplied by   Group folder image Groups   Detailed description  
  Rate classes User ratings   Dependents   Trackback   Applications   Files Files  
  • Supplied by:

    Picture of Luca Mariano
    Name: Luca Mariano <e-mail contact>
    Published packages: 1
    Country: Italy Italy - PHP jobs in Italy
    Home page: http://www.lucamariano.it/
    Age: 33
    All time rank: 325
    Week rank: 334

    Browse this author's classes

  • Groups:

    Group folder image Unix Use of capabilities specific of POSIX, Unix like operating systems View top rated classes
    Group folder image Language Constructs to assist in the language control View top rated classes
  • Detailed description:

    Wrapper around the pcntl_fork() stuff, with a API set like Java language.
    Practical usage is done by extending this class, and re-defining the run() method.
    This way PHP developers can enclose logic into a class that extends PHP_Fork, then execute the start() method that forks a child process.
    Communications with the forked process is ensured by using a Shared Memory Segment; by using a user-defined signal and this shared memory developers can access to child process methods that returns a serializable variable.

    The shared variable space can be accessed with the tho methods:
    o void setVariable($name, $value)
    o mixed getVariable($name)

    $name must be a valid PHP variable name;
    $value must be a variable or a serializable object.
    Resources (db connections, streams, etc.) cannot be serialized and so they're not correctly handled.

    Only runs on *NIX systems, because Windows lacks of the needed pcntl ext.
  • User ratings:

    Ratings
    Utility
    Consistency
    Documentation
    Examples
    Tests
    Videos
    Overall
    Rank
    All time:
    Sufficient (60.7%)
    Sufficient (71.4%)
    Sufficient (67.9%)
    Sufficient (75.0%)
    -
    -
    Not sure (51.8%)
    1040
    Month:
    Not yet rated by the users
  • Packages that need this class:

    Class Dependency Why it is needed
    DNServer
    Conditional
    To implement the DNServer_multithreaded.
    PHP Cron Daemon
    Required
    This class forms the actual thread-generation. Is included by default
  • Trackback links:

    Link Description
    Multi threading with PHP Surfing in Phpclasses I’ve found a really useful (at least for me) class that implements a Java like thread class...
    PHP multithreading realization In PHPClasses I discovered is extremely something useful (at least to me) similar to Java thread class...
    PHP: Your imagination is your limit Do you think PHP was only developed for write Web-Sites?... I invite ...
    Threads in PHP Class: Thread is a wrapper around the pcntl_fork() stuff, with a API set like Java language...
    Latest blog trackback links Latest blog trackback links
  • Applications that use this class:

    Link Description
    PHPlet An application server written in PHP
    Add link image If you know an application of this package, send a message to the author to add a link here.
  • Files:

    File Role Description
    Plain text file action_dispatcher.php Example shows a multiprocess application scheme where all processes run a sleep() cycle, and a centralized dispatcher pass them the work.
    Plain text file basic.php Example a basic example, only two pseudo-threads that increment a counter simultaneously
    Plain text file exec_methods.php Example shows how to execute methods into the child process.
    Plain text file Fork.php Class Main class
    Plain text file INSTALL Doc. installation instructions
    Plain text file passing_vars.php Example shows variable exchange between the parent process and started pseudo-threads.
    HTML file php_fork-api.html Doc. API docs
    Plain text file simple_controller.php Example shows how to attach a controller to started pseudo-threads.
    Download all files: php_fork.tar.gz php_fork.zip
    NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products