11 /* Startup object is generated with the initialstate flag set by the
12 * system to start the computation up */
14 task Startup(StartupObject s {initialstate}) {
15 for(int i=0;i<10;i++) {
16 Example e=new Example() {needoperation};
22 taskexit(s {!initialstate}); /* Turns initial state flag off, so this task won't refire */
27 task DoOperation(Example e{needoperation}) {
31 /* Print the result */
32 taskexit(e {!needoperation, needprinting});
34 /* Don't print the result */
35 taskexit(e {!needoperation});
38 /* Note that we can write arbitrary boolean expressions for flag
39 * expressions. For example, needprinting && ! needoperation would
40 * also be a legal flag expression */
42 task DoPrint(Example e{needprinting}) {
44 taskexit(e {!needprinting};