We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ef2d99 commit 25916c0Copy full SHA for 25916c0
examples/timer/thread1.m
@@ -2,9 +2,10 @@ function thread1() %#codegen
2
3
stllog('hello from thread1');
4
5
- for i=1:20
+ for i=1:100
6
stl.semwait(0)
7
- stl.log('wakeup');
+ ii = int32(i)
8
+ stl.log('wakeup %d', ii);
9
end
10
11
examples/timer/user.m
@@ -13,9 +13,9 @@
13
stllog('thread id %d', t1)
14
15
timer = stl.timer('timer1', 2.0, s1);
16
+
17
join(t1); % wait for thread 1 to finish
18
-
19
% done, exiting will tear down all the threads
20
21
0 commit comments