PHP Classes
elePHPant
Icontem

Notable PHP package: Axync

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author: Manuel Lemos

Posted on:

Categories: Notable Packages

Cooperative multitasking is a way to execute multiple tasks concurrently.

Only one task runs at each moment but it gives the turn to the next task in the list of concurrent tasks, for instance when it needs to wait for some I/O operation to complete, like accesses to files, databases, or network connections.

This class implements a manager for cooperative multitasking in pure PHP.

It takes advantage of generators introduced in PHP 5.5 to let one task decide when it can give the control to the next task.

Read this article to learn more details about how this notable PHP package works.




The package Axync is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Run several tasks using cooperative multitasking

Here follows in more detail what it does:

This class can run several tasks using cooperative multitasking.

It can takes one or more callback functions that will do the work of different tasks.

The class will execute the registered functions in a loop until all functions are finished.

The functions should use the PHP yield command after they do their work, so they allow the next function to do its part of the work.

The class can also return a generator that can be used by another object of the class to iterate over a list of callable functions or generators, thus implemented nested cooperative multitasking.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.

You need to be a registered user or login to post a comment

1,394,120 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)