Download the PHP package carno-php/coroutine without Composer

On this page you can find all versions of the php package carno-php/coroutine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coroutine

Coroutine - component of carno-php

Installation

Concepts

Cooperative multitasking using coroutines (in PHP!)

yield values

Generator

When yield a function and it's returned a generator (yield in function), job will make a roll and have a chance to execute other jobs, some functions like depends on this feature

Promised

Yield a will make coroutine sleep when pending, and wakeup when promise resolves or rejects, general used with async IO

Syscall

can make user in coroutine to get job's properties or interact with job, such as get job's id or ctx

Functions

namespace in

go

New coroutine without results but throws exception if error

usages

co

Similar with but returns and you can execute it later

usages

async

Base of commands and , it returns a promise that sync with coroutine's result

Returned promise will resolving when coroutine finish or rejecting when coroutine throws exception

usages

await

A delegate for works with async IO event, supports timeout

usages

timeout

Create a promise that throws exception after N milliseconds if no one rejects it in time, useful with

usages

msleep

Create a promise that resolves after N milliseconds

usages

ctx

Get job's ctx in coroutine

usages

defer

A defer statement defers the execution of a function until the surrounding function returns.

usages

race

Same effect as promise's but accepts and

usages

all

Same syntax with


All versions of coroutine with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
carno-php/promise Version ^1.0
carno-php/timer Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package carno-php/coroutine contains the following files

Loading the files please wait ....