Parfeval, Backgroundpool and Webread
조회 수: 10 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
Edric Ellis
2022년 1월 10일
Unfortunately, as you suspect, right now the only way to do this is to use a process pool via parpool('local') or similar.
댓글 수: 2
Alex Alex
2022년 2월 17일
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.
Raymond Norris
2022년 2월 17일
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)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!