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:
hyunghwan.chung
2017-09-29 15:03:54 +00:00
parent e38a4f1f20
commit 303b49270d
9 changed files with 120 additions and 12 deletions

View File

@ -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.