fixed the wrong argument handling problem

This commit is contained in:
hyunghwan.chung
2017-12-16 05:21:38 +00:00
parent 27fa6fa560
commit 49f0ff0bda
4 changed files with 19 additions and 20 deletions

View File

@ -9,6 +9,6 @@
#include 'Process.moo'.
(* -------------------------------------------------------------------------- *)
#include 'FFI.moo'.
## #include 'FFI.moo'.
#include 'Stdio.moo'.
#include 'Console.moo'.
## #include 'Console.moo'.

View File

@ -237,25 +237,23 @@ method(#class,#abstract) xxx. => method(#class) xxx { self subclassResponsibilit
## arrange the processor to notify upon timeout.
System signal: s after: seconds.
[
[
## wait on the semaphore group.
r := self wait.
] on: Exception do: [:ex |
r := self wait.
## if the internal semaphore has been signaled,
## arrange to return nil to indicate timeout.
if (r == s) { r := nil }
elsif (r signalAction notNil) { r signalAction value: r }.
] ensure: [
## nullify the membership
self removeSemaphore: s.
## cancel the notification arrangement in case it didn't time out.
System unsignal: s.
ex throw
].
## if the internal semaphore has been signaled,
## arrange to return nil to indicate timeout.
if (r == s) { r := nil }
elsif (r signalAction notNil) { r signalAction value: r }.
## nullify the membership
self removeSemaphore: s.
## cancel the notification arrangement in case it didn't time out.
System unsignal: s.
^r.
}
}