Parfeval, Backgroundpool and Webread

I am trying to use parfeval to do a webread on a background pool and it responds with the message...
Invalid default value for property 'UserAgent' in class 'weboptions':Use of function version is not supported on a thread-based worker. Use alternatives supported on the background pool.
which I assume means I can't use webread with the background pool.
is there another way to do this?

 Respuesta aceptada

Edric Ellis
Edric Ellis el 10 de En. de 2022

0 votos

Unfortunately, as you suspect, right now the only way to do this is to use a process pool via parpool('local') or similar.

2 comentarios

Alex Alex
Alex Alex el 17 de Feb. de 2022
The message says that there are alternatives supported on the backgound pool. Could you give a hint what they are? matlab.net.http.RequestMessage? Thank you.
As Edric suggests, use a local parallel pool.
pool = parpool("local",1);
f = pool.parfeval(@webread,1,'http://www.mathworks.com');
f.wait
size(f.fetchOutputs)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 10 de En. de 2022

Comentada:

el 17 de Feb. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by