Example Does Not Work

조회 수: 28 (최근 30일)
William
William 2025년 11월 26일
댓글: Walter Roberson 2025년 11월 28일 20:22
I try to run the example. The second line of code workerToClient = parallel.pool.PollableDataQueue(Destination="any") gives me this error:
Error using parallel.pool.PollableDataQueue (line 28)
Too many input arguments.
I remove the Destination = "any" argument and that seems to get things working. But then I get to the for-loop in the example:
for idx = 1:5
send(clientToWorker, [idx rand]);
status = poll(workerToClient, inf)
end
and the computer locks up with no output. I force-quite (CTRL-C) and type
future.State
The result is 'finished'. It seems the process stopped and I never sent the stop message. Seems nothing I can do will keep the process running.
  댓글 수: 6
William
William 2025년 11월 28일 16:35
Is there no way to do block a parallel process while it waits for data pre-2025a?
Walter Roberson
Walter Roberson 2025년 11월 28일 20:22
You have to be careful about what you are polling, as there is no Destination="any"

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by