Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
65 views

I'm using Amphp version 2.6 to create asynchronous socket connections to a Minecraft server. During this connection I send integers, strings and bytes to the server in order to retrieve info from a ...
Nimetu's user avatar
  • 67
1 vote
0 answers
101 views

My code runs inside worker, so it executes in parallel way. I wanted to use postgres transactions with amp/postgres library, so I wrote this code: public static function ...
Davidaa_WoW's user avatar
0 votes
0 answers
70 views

I need some help with using global constants inside amp\parallelMap. I have a bootstrap file that I require_once in my project, where I define global constants like MAX_DATA. Here's a simplified ...
user2531657's user avatar
2 votes
1 answer
297 views

How to run below script using Revolt\EventLoop use Amp\Loop; Loop::Run(static function() { echo "Callback function executed!" . PHP_EOL; }) Im tried this code but it return blank ...
Andika Saputra's user avatar
1 vote
1 answer
52 views

I have two composer packages that require different versions of the same dependency. I have found answers like this that help me diagnose the problem, but not how to resolve it. Package A (amphp/...
Jerry's user avatar
  • 3,618
1 vote
0 answers
150 views

I've been working on parallelising some data pipelines with AMPHP in a large codebase, and now I'd like to allow a timeout for if one of the pipelines fails. The exact behaviour I'm after is having a ...
Peter Job's user avatar
0 votes
1 answer
170 views

My goal is to create a pipeline that could have tens of thousands of items in the iterator. Since this can take a long time to process, I want to steam the results back to the client as they are ...
Jerry's user avatar
  • 3,618
0 votes
1 answer
198 views

I am implementing AMPHP for multithreading, replacing an existing "multicurl callback" solution where new php processes were created by doing an external call to the server from within the ...
Peter Job's user avatar
0 votes
1 answer
134 views

After reading the documentation for AMPHP I haven't been able to track down an example for returning results from a threaded process, however many examples for printing data from a thread exist. Are ...
tree317's user avatar
  • 21
0 votes
0 answers
60 views

I have a worker pool with some tasks running. Workers are using consumables they may request at any time - I wish to use Parcel for this purpose. Parcel is a very convenient way of communicating with ...
MegaBomber's user avatar
0 votes
1 answer
379 views

Is there a way to execute internal functions in parallel in PHP? For example, I have four functions: function a(){ return 1; } function b(){ return 2; } function c(){ return 3; } ...
Buggy's user avatar
  • 11
0 votes
0 answers
82 views

I'm just a beginner, please tell me if it is possible to return the result from a php function, but at the same time so that asynchronous actions continue to work in it using the amphp library? ...
misksa's user avatar
  • 1
0 votes
1 answer
325 views

I am using the following code to submit workers into the queue and then run them with Task. $executions = []; foreach ($urls as $url) { // FetchTask is just an example, you'll have to implement ...
MindGamer's user avatar
  • 136
0 votes
1 answer
193 views

I am trying to use Amphp Parallel functions with the Magento framework in a custom module. try { $response = wait(parallelMap($items, function ($item) use ($arg1){ $this->getCustomItems(...
Margue's user avatar
  • 43
1 vote
1 answer
2k views

i want to use AMP PHP and create a Project. So i started with one of the examples on github and i can see hello world. Now if i make changes to my code, i have to restart everytime the server. but ...
Vitalij Mik's user avatar

15 30 50 per page
1
2 3 4 5