|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] UUID and Monitor Squeak classes equivalent in gst? |
Date: | Wed, 17 Jun 2009 15:29:13 +0200 |
User-agent: | Thunderbird 2.0.0.17 (X11/20081009) |
Nicolas Petton wrote:
Thanks Paolo, I'll have a look at those classes. One other question, is there something like the MessageTally class in Squeak?.
I usually use the code in unsupported/Profile.st: Bag subclass: IdentityBag [ dictionaryClass [ ^IdentityDictionary ] ] BlockClosure extend [ profile [ | s profProcess workProcess results | s := Semaphore new. results := IdentityBag new. workProcess := self newProcess. profProcess := [ workProcess resume. [ (Delay forMilliseconds: 5) wait. workProcess isTerminated ] whileFalse: [ results add: workProcess suspendedContext method. ]. s signal ] forkAt: Processor highIOPriority. s wait. ^results sortedByCount ] ] [10000 factorial] profile do: [ :each|each printNl ]
[Prev in Thread] | Current Thread | [Next in Thread] |