承接 mkusher/react-co 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mkusher/react-co

Composer 安装命令:

composer require mkusher/react-co

包简介

Simple reactphp coroutines

README 文档

README

Build Status

Simple coroutines for your reactphp applications.

Installation

Use composer to install this package

composer require mkusher/react-co

Coroutines

Don't know what coroutines are? Read this awesome article by Nikita Popov

Examples

Basic example where asyncOp1 and asyncOp2 your asynchronous functions that return instance of PromiseInterface.

use Mkusher\Co;

Co\await(function() {
    $a = yield asyncOp1();
    $b = yield asyncOp2($a);
});

await returns Promise, so that you can wait for all your operatoins to complete like:

use Mkusher\Co;

Co\await(function() {
    $a = yield asyncOp1();
    return "10";
})->then(function($result) {
    echo $result;
});

This example will write "10" after executing asyncOp1.

You can find more examples in examples dir

统计信息

  • 总下载量: 4.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固