Joey
Joey
You might be better of using multiple processes and a more stable async lib instead. I think collect might be an async function. Also that might be old pthreads. I...
If there's no leak in while then it's just you need to manually gc which is a bit freaky. It doesn't seem like in that case you have a memory...
Move the pool collect somewhere else as well so it runs every second, not every five. You're delaying it worse with that. Also you're wrapping too much with that try...
Wouldn't it be easier to just put that on a branch?
It would be easier to read if you reduced indentation by a level. It looks like you have the same boat of bananas I've got. You actually need to notify...
You might also want to try Worker::collect. I'm trying to avoid it though because it looks like a lot of overhead. You also need volatile I believe to update those...
I don't understand what this is, it looks like an exploit.
Double bufferring *appears* to avoid the issue: private $data = [[], []]; private $i = 0; public function push($value):void { $this->data[$this->i][] = $value; } public function drain():Volatile { $data =...
Here: https://github.com/joeyhub/aphpsync/blob/master/prototypes/test.php
It's worth pointing out that I have a ref issue there. Eventually a command is sent to a thread which holds a reference up to a thread to notify when...