phpgt / async Goto Github PK
View Code? Open in Web Editor NEWPromise-based non-blocking operations.
Promise-based non-blocking operations.
Implementing the fetch API with Gt promises, the following block of code is not shared amongst the other libraries correctly:
https://github.com/PhpGt/Async/blob/master/src/Loop.php#L49-L68
While there is an obvious need to work with Deferred objects, this shouldn't be a hard coded dependency on one particular implementation.
As it turns out, Promise implementation is non-trivial. It would be good to provide a set of interfaces and implementation within its own repository.
Similar functionality to React PHP's Promise implementation, but so that a Deferred object can be assigned a "process" function, to execute one unit of work within.
The process function will probably be a part of the class whose function is returning a promise. In which case, the class can keep track of the Deferred object, so that when the process function realises that it's finished, it can easily reference the deferred object to resolve or reject it.
PHP 8.1 is here now. No excuse!
The last feature to be handled by this repository before v1 release is a pub:sub model for event dispatching.
Dependabot needs to be tamed, as per PhpGt/WebEngine#568
I noticed when debugging php.gt/fetch that there were a lot of values within the timerList
property of the loop
object. It seems that each time a periodic timer is set, the old timers are still kept.
Does a garbage collection need to occur every time there's a timer triggered, to remove old triggers that have already been triggered?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.