From 883f507497338cd33457fee706af9ab9eccf11a5 Mon Sep 17 00:00:00 2001 From: halw Date: Mon, 14 Mar 2011 03:34:23 +0000 Subject: [PATCH] Author:halw Date:2011-03-14T03:34:23.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@844 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../concurrent-eiffel-scoop/scoop-examples/senate-bus.wiki | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/senate-bus.wiki b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/senate-bus.wiki index ef23af04..78bdb9b0 100644 --- a/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/senate-bus.wiki +++ b/documentation/current/solutions/concurrent-computing/concurrent-eiffel-scoop/scoop-examples/senate-bus.wiki @@ -17,7 +17,11 @@ According to Allen Downey in his text ''[http://greenteapress.com/semaphores/ Th The root class for this example creates the bus stop, the bus, and the passengers all typed as separate. The bus stop, modeled by class STATION has features that can be used by the bus and by passengers. Access to these -features is restricted to the appropriate client classes through the clients part of the feature clause. Clients of type PASSENGER can access {STATION}.pass_enter. A client of type {BUS} can access {STATION}.bus_enter, {STATION}.pick_up, and {STATION}.leave, as well as a status feature {STATION}.bus_is_waiting and two passenger queues {STATION}.waiting_list and {STATION}.checked_in_list. +features is restricted to the appropriate client classes through the clients part of the feature clause. Clients of type PASSENGER can access {STATION}.pass_enter. A client of type BUS can access {STATION}.bus_enter, {STATION}.pick_up, and {STATION}.leave, as well as a status feature {STATION}.bus_is_waiting and two passenger queues {STATION}.waiting_list and {STATION}.checked_in_list. + +The lifecycle of a passenger is simple: enter the bus stop. This is accomplished by making a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] to {STATION}.enter and passing Current (the passenger object itself) as an argument. + +The lifecycle of the bus is slightly more complex: enter the bus stop, pick up passengers, leave the bus stop, wait for a short time. The bus repeats this sequence forever. The routines in class BUS for entering the bus stop, picking up passengers, and leaving the bus stop all accept as an argument the separate bus stop object (a_station: separate STATION) and make a [[Concurrent Eiffel with SCOOP#Separate types and separate calls|separate call]] to the corresponding routine in STATION.