Git Product home page Git Product logo

c-ext's Introduction

基于c ,c ++ 封装php对象扩展

docs:http://wiki.brewlin.com/wiki/c-ext/index/

编译部署

$> phpize
$> ./configure
$> make & make install
$> echo extension=path/to/lib.so >> /etc/php?/php.ini

@Lib

所有的扩展对象均以Lib 命名空间为开头

namespace Lib;

@cgo()

创建一个协程运行

@Lib/SharMem

该扩展申请一块共享内存地址,提供php调用,用于多进程间共享数据

@Lib/Process

该扩展初始化传入回调函数并创建子进程执行,子进程间可以通过channel通讯

@Lib/Timer

提供定时任务和对于timer操作,基于epoll阻塞实现定时器,采用链表保存时间任务,有待提高性能

@Lib/Coroutine/Server

提供携程化socket服务,监听tcp协议

@Lib/Thread/Pool

创建线程池,等待投递任务执行

@Lib/Thread/Pool/Future

阻塞等待线程任务执行完毕,并获取返回值

c-ext's People

Stargazers

 avatar  avatar  avatar  avatar

Forkers

xxyyboy tdx113

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.