From 415f6051502f956a3ffbe3d5553ace32e8c5be07 Mon Sep 17 00:00:00 2001 From: halw Date: Mon, 3 Dec 2012 13:00:22 +0000 Subject: [PATCH] m Author:halw Date:2012-12-03T13:00:22.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1202 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../concurrent-eiffel-scoop/scoop-examples/faneuil-hall.wiki | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/faneuil-hall.wiki b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/faneuil-hall.wiki index 5cec89f9..0d317473 100644 --- a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/faneuil-hall.wiki +++ b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/faneuil-hall.wiki @@ -10,7 +10,7 @@ The scenario in the Faneuil Hall example involves a number of immigrants waiting =Highlights= -The primary actors here are the immigrants, the judge, and the spectators, model by classes IMMIGRANT, JUDGE, and SPECTATOR, respectively. In addition to the actor classes, there is a class HALL that represents Faneuil Hall itself, and a root class that sets everything up and starts the processing. There is only one judge, but there is a maximum numbers of immigrants and spectators. The specific number of immigrants and spectators varies at random from one execution to the next. You can experiment with larger or smaller maximum numbers for immigrants and spectators by changing the values for the constants {FANEUIL_HALL}.Max_immigrants and {FANEUIL_HALL}.Max_spectators. +The primary actors here are the immigrants, the judge, and the spectators, model by classes IMMIGRANT, JUDGE, and SPECTATOR, respectively. In addition to the actor classes, there is a class HALL that represents Faneuil Hall itself, and a root class that sets everything up and starts the processing. There is only one judge. But there can be many immigrants and spectators. Their numbers are limited to certain maximums specified by constants in the root class. The specific number of immigrants and spectators varies at random from one execution to the next. You can experiment with larger or smaller maximum numbers for immigrants and spectators by changing the values for the constants {FANEUIL_HALL}.Max_immigrants and {FANEUIL_HALL}.Max_spectators. Although not really considered an actor here, the class HALL plays a critical role in synchronizing the concurrent actions of the immigrants, spectators, and the judge. HALL includes many status queries which, when used in preconditions in features of the other actors, constitute [[Concurrent Eiffel with SCOOP#Preconditions|uncontrolled precondition clauses]] which when false will cause the calling processor to wait until the condition becomes true. For example, consider the following status query from class HALL: @@ -37,7 +37,7 @@ This query is used by the JUDGE when preparing to sit and administe The judge will take his place only when all the immigrants present have checked in and are ready to take the oath. -Another thing to note about this example is that immigrants and spectators obey slightly different rules when coming and going in the hall. Neither immigrants nor spectators may enter the hall if the judge is in the hall. Immigrants may not leave until the judge has left, but spectators can leave at anytime. So when you compare the leave features of the two classes you'll see a wait condition on {IMMIGRANT}.leave that is not present on {SPECTATOR}.leave. +Another thing to note about this example is that immigrants and spectators obey slightly different rules when coming and going in the hall. Neither immigrants nor spectators may enter the hall if the judge is in the hall. Immigrants may not leave until the judge has left, but spectators may leave at anytime. So when you compare the leave features of the two classes you'll see a precondition that serves as a wait condition on {IMMIGRANT}.leave that is not present on {SPECTATOR}.leave.