From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 19 Feb 1998 23:36:50 +0900 From: Kenji Arisawa arisawa@ar.aichi-u.ac.jp Subject: [9fans] Alef Guarded Block Topicbox-Message-UUID: 72548006-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19980219143650.k6-3J8fJSTuXBNWYO5QACmmTxDgQyMtwKwo_6fcr2a8@z> Hello 9fans! Am I misunderstanding the guarded block of Alef? The program a.l bellow lead to dead lock. term% 8.out alice: entering guarded block alice: waiting msg carol: entering guarded block --- dead lock here ! --- Is this correct result? ----------------------- a.l ------------------------- #include void alice(chan(int) msg){ sleep(100); print("alice: entering guarded block\n"); !{ print("alice: waiting msg\n"); <- msg; } print("alice: done\n"); } void carol(chan(int) msg){ sleep(130); print("carol: entering guarded block\n"); !{ print("carol: sending msg\n"); msg <- = 1; } print("carol: done\n"); } void main(void){ chan(int) msg; alloc msg; par { alice(msg); carol(msg); } } ----------------------------------------------------- Kenji Arisawa E-mail: arisawa@aichi-u.ac.jp