added moo_iskindof().
changed isKindOf: to utilize a new primitive _is_kind_of. marked BlockContext and MethodContext to be #final and #limited
This commit is contained in:
@ -94,12 +94,14 @@ TODO: timed wait...
|
||||
}
|
||||
*)
|
||||
|
||||
(* TODO: MIGRATE TO MUTEX...
|
||||
method critical: aBlock
|
||||
{
|
||||
self wait.
|
||||
^aBlock ensure: [ self signal ]
|
||||
}
|
||||
}*)
|
||||
|
||||
|
||||
## ==================================================================
|
||||
|
||||
method heapIndex
|
||||
@ -133,6 +135,26 @@ TODO: timed wait...
|
||||
}
|
||||
}
|
||||
|
||||
class Mutex(Semaphore)
|
||||
{
|
||||
method(#class) new
|
||||
{
|
||||
| s |
|
||||
s := super new.
|
||||
s signal.
|
||||
^s.
|
||||
}
|
||||
|
||||
method lock { ^self wait }
|
||||
method unlock { ^self signal }
|
||||
|
||||
method critical: block
|
||||
{
|
||||
self wait.
|
||||
^block ensure: [ self signal ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
(*
|
||||
xxx := Semaphore new.
|
||||
|
Reference in New Issue
Block a user