How to restart a new backgroundPool
조회 수: 9 (최근 30일)
이전 댓글 표시
The delete( gcp('nocreate')) doesn't seem to be deleting the predefined backgroundPool.
>> pool = backgroundPool;
>> delete(gcp('nocreate'));
>> pool
pool =
BackgroundPool with properties:
NumWorkers: 24
Busy: false
Below would work. However we will not have variable pool in advance
>> pool = backgroundPool;
>> delete( pool);
>> pool
pool =
Deleted object.
any suggestion how to restart a fresh backgroundPool?
댓글 수: 1
답변 (1개)
Matt J
2025년 2월 12일
편집: Matt J
2025년 2월 12일
delete(pool)
pool = backgroundPool;
댓글 수: 2
Matt J
2025년 2월 12일
From ChatGPT:
There isn't a direct analog of gcp('nocreate') for backgroundPool because backgroundPool is a built-in, persistent pool that always exists when Parallel Computing Toolbox is available. Behavior Differences from gcp:
- Unlike parpool, which creates and manages a pool of workers explicitly, backgroundPool is always available.
- Calling backgroundPool multiple times always returns the same handle; it does not create additional instances.
- Since backgroundPool is never "closed" or "deleted," there's no need for a 'nocreate' option like gcp('nocreate').
참고 항목
카테고리
Help Center 및 File Exchange에서 Programming Utilities에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!