help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [feature] ObjectMemory quit waits for ever


From: Tony Garnock-Jones
Subject: [Help-smalltalk] [feature] ObjectMemory quit waits for ever
Date: Sun, 06 Jan 2008 04:17:24 -0700

Issue status update for http://smalltalk.gnu.org/node/152 Post a follow up: http://smalltalk.gnu.org/project/comments/add/152

Project:      GNU Smalltalk
Version:      <none>
Component:    Base classes
Category:     feature requests
Priority:     normal
Assigned to:  Unassigned
Reported by:  tonyg
Updated by:   tonyg
Status:       active

In cases where an anonymous background process is running at full tilt,
and does not put itself to sleep (although it may yield the Processor),
if ObjectMemory quit is called, the system will wait forever for the
background process to terminate. This is polite, and seems a worthwhile
behaviour to preserve, but should it be the default? I expected
ObjectMemory quit to fairly smartly terminate the VM.


Example:



[| d count |
   d := Delay forMilliseconds: 500.
   count := 0.
   [
       count := count + 1.
        (count \\ 100) = 0 ifTrue: [
         Transcript << 'count: ' << count; nl.
          Processor yield.
       ].
   ] repeat.
] fork.
Transcript << 'quitting'; nl.
ObjectMemory quit.

Actual output:



count: 100
quitting

... and then it hangs, not using any CPU. (Which is in itself strange -
why isn't the loop continuing?)


Expected:



count: 100
quitting

... followed by a return to the unix shell.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]