source: CIVL/examples/experimental/spawnassert.cvl@ 85d4675

1.23 2.0 main test-branch
Last change on this file since 85d4675 was 8fa5a7b, checked in by Tim Zirkel <zirkeltk@…>, 13 years ago

moved untested/unused examples to experimental folder

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@235 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 285 bytes
Line 
1#include <civlc.h>
2int N = 5; /* number of threads */
3$proc threads[N]; // the threads
4
5void run(int tid) {
6 $assert 0==1; // why isn't this run?
7 while (1==1) {
8 }
9}
10
11void main() {
12 for (int i=0; i<N; i++) threads[i] = $spawn run(i);
13 for (int i=0; i<N; i++) $wait threads[i];
14}
Note: See TracBrowser for help on using the repository browser.