Skip to content

Commit afdf90e

Browse files
committed
test: ✅ add test
Release-As: 0.1.0 Basic functionality test in a thread-based pool.
1 parent 18f9a0c commit afdf90e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/matlab.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ jobs:
1515
with:
1616
release: ${{ matrix.release }}
1717
cache: true
18+
products: >
19+
Parallel_Computing_Toolbox
1820
- uses: matlab-actions/run-build@v2

test.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
assert(true);
1+
if isempty(gcp('nocreate'))
2+
parpool('Threads',2);
3+
end
4+
num_iterations = 8;
5+
[self, update_queue] = ParWaitBar(num_iterations,'Name','Test','visible','off');
6+
parfor (i=1:num_iterations,2)
7+
pause(1);
8+
send(update_queue,[]);
9+
end
10+
self.finish();
11+
assert(self.state==num_iterations);

0 commit comments

Comments
 (0)