Comments (4)
Hello, thank you for your interest in this library! The commitAsync
method is synchronous and always will be, that is the intended behaviour - PHP is not natively asynchronous hence what you're describing can never really occur (ReactPHP allows for event-driven programming to occur in PHP however the code doesn't run in parallel or asynchronously - or at least as far as I know, I'm not too familiar with ReactPHP).
However, you can use the event loop of ReactPHP to invoke methods kind of asynchronously. Check out this code snippet showing how to use ReactPHP's event loop within the Guzzle library. Furthermore, keep in mind that commitAsync
will always block since that is when the request promises are being waited for.
from riot-api-league.
So there are no plans to make the library non-blocking?
from riot-api-league.
This is the least blocking it can be, I guess. You can make Guzzle use the ReactPHP's event loop and move the commitAsync
to some "asynchronous" function called from the event loop too. That way, you can achieve some level of asynchronicity. However, PHP is not asynchronous; hence, true asynchronicity cannot be achieved - some function will always block.
from riot-api-league.
I will do so. Blocking data loading takes most of the time. A lot of useful work can be done while waiting for a response from the Riot API. Thank you.
from riot-api-league.
Related Issues (11)
- Question about match-v5 HOT 21
- MatchDto Objects not working
- Setting Manual Rate Limit HOT 1
- OCE Matches returning really old matches? HOT 1
- Question - Update for ParticipantDto.php
- ParticipantsIdentity -> player -> teamId does not exists HOT 5
- Runes HOT 2
- StaticItemDto HOT 1
- API looking fo summoner HOT 2
- Wiki pages returns to readme HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riot-api-league.