Git Product home page Git Product logo

hhvm-ext-uv's People

Contributors

rickysu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hhvm-ext-uv's Issues

Not working on HHVM 3.9

In file included from /steel/Sources/hhvm-ext-uv/src/ext.h:6:0,
                 from /steel/Sources/hhvm-ext-uv/src/ext.cpp:1:
/steel/Sources/hhvm-ext-uv/src/util.h: In function ‘HPHP::ObjectData* HPHP::makeObject(const HPHP::String&, HPHP::Array, bool)’:
/steel/Sources/hhvm-ext-uv/src/util.h:18:53: error: conversion from ‘HPHP::ObjectData*’ to non-scalar type ‘HPHP::Object’ requested
         Object o = ret = ObjectData::newInstance(cls);        
                                                     ^
CMakeFiles/uv.dir/build.make:54: recipe for target 'CMakeFiles/uv.dir/src/ext.cpp.o' failed
make[2]: *** [CMakeFiles/uv.dir/src/ext.cpp.o] Error 1
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/uv.dir/all' failed
make[1]: *** [CMakeFiles/uv.dir/all] Error 2
Makefile:107: recipe for target 'all' failed
make: *** [all] Error 2

Assertion failed on read start

<?h
class AsyncRedis{
  public UVTcp $Connection;
  public bool $Status = false;
  public function __construct(string $Host, int $Port){
    $this->Connection = new UVTcp();
    $this->Connection->connect($Host, $Port, function(){
      $this->Status = true;
      echo 'Exit';
    });
    $this->Connection->setCallback(function($Data){
      echo $Data."\n";
    }, function(){

      }, function(){

        });
    $this->Connection->write("asd");
  }
}
$Redis = new AsyncRedis('localhost', 6379);
UVLoop::defaultLoop()->run();
hhvm: src/unix/stream.c:1489: uv_read_start: Assertion `((stream)->io_watcher.fd) >= 0' failed.
Segmentation fault (core dumped)

Not working with hhvm 3.8.0

In file included from /anees/Sources/hhvm-ext-uv/src/ext.h:6:0,
                 from /anees/Sources/hhvm-ext-uv/src/ext.cpp:1:
/anees/Sources/hhvm-ext-uv/src/util.h: In function ‘int HPHP::resource_to_fd(const HPHP::Resource&)’:
/anees/Sources/hhvm-ext-uv/src/util.h:39:40: error: cannot convert ‘HPHP::SmartPtr<HPHP::File>’ to ‘HPHP::File*’ in initialization
         File *file = fd.getTyped<File>();
                                        ^
/anees/Sources/hhvm-ext-uv/src/util.h:43:44: error: cannot convert ‘HPHP::SmartPtr<HPHP::Socket>’ to ‘HPHP::Socket*’ in initialization
         Socket *sock = fd.getTyped<Socket>();
                                            ^
CMakeFiles/uv.dir/build.make:54: recipe for target 'CMakeFiles/uv.dir/src/ext.cpp.o' failed
make[2]: *** [CMakeFiles/uv.dir/src/ext.cpp.o] Error 1
CMakeFiles/Makefile2:161: recipe for target 'CMakeFiles/uv.dir/all' failed
make[1]: *** [CMakeFiles/uv.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
[07:08 PM] steel@Black-Beauty [/anees/Sources/hhvm-ext-uv] {master} $ hhvm --version
HipHop VM 3.8.0 (rel)
Compiler: tags/HHVM-3.8.0-0-gbb32f8d645b28561d8491870c44730b9b3f08d35
Repo schema: 74bee5d310450724cfd49245fd6c2e1e4323b10a

Question: Is extension buffering data

In Node, the read function is triggered quite frequently but I see that in Hack, the read callback is only triggered once. so my question is, is this extension buffering the data? If it's buffering, can we specify a buffering limit? so people can't flood our ram with infinite data.

How to keep the loop alive?

I am not quite experienced with UV yet, but I've found it great so far, but I still don't know how to keep the loop alive, maybe your experience can help me?

<?php
echo "One\n";
$Timer = new UVTimer();
$Timer->start(function(){
  echo "Three\n";
}, 0);
echo "TWo\n";
UVLoop::defaultLoop()->run();
echo "One\n";
$Timer = new UVTimer();
$Timer->start(function(){
  echo "Three";
}, 0);
echo "TWo\n";

Here's a minimal repro of what I am trying to do, I am writing a UV based async Promise library.

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.