diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-11 12:19:37 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-11 12:21:36 +0100 |
commit | 421ac8dd46ca48742bcf2f896232faa5dd5424bf (patch) | |
tree | d133bbac1dcae0fa2e8811bb8b70474c5e7e3a31 /TestPhone.st | |
parent | fe9d459ff91a81cdb1128bbfe913228cbe9b7f40 (diff) |
GSM: Make sure the caller of serve is always notified. provide isConnected
Diffstat (limited to 'TestPhone.st')
-rw-r--r-- | TestPhone.st | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/TestPhone.st b/TestPhone.st index 472464d..4057f2c 100644 --- a/TestPhone.st +++ b/TestPhone.st @@ -88,12 +88,20 @@ Object subclass: IPAConfig [ serve [ [ - connection serve. - 'Connection disconnected' printNl. - sem signal. + [ + connection serve. + 'Connection disconnected' printNl. + ] ensure: [ + connection := nil. + sem signal. + ] ] fork. ] + isConnected [ + ^ connection isNil not + ] + semaphore [ ^ sem ] sendLU: aPhone [ |