Closed chegmarco1989 closed 1 year ago
Apologies that this issue did not receive more immediate attention.
To use a function in a worker pool, you must define the function in a way that the Composer autoloader can load. In general, I'd recommend exploring the Task
interface instead to define custom logic to execute in a worker.
Seeing as this issue is old, I'm going to close it. If you need further support, please open another issue (and I'll try to reply a bit faster) 👍
Could you give me a usage example for my getDetails($href)
function ???
Please guide me. Awaiting your reply.
Hello.
We are trying to use this amPHP-Parallel library (https://github.com/amphp/parallel) to our
getDetails($href)
function. Knowing that the README used thefile_get_contents
function in the promises as follows:While my
getDetails($href)
function, which I am trying to process in parallel, as you can see, takes as a parameter or argument between brackets, a value (here represented by the variable$href
), how then, can I include it in theWorker\enqueueCallable()
to replace the defaultfile_get_contents
???Please enlighten me please.