List Info

Thread: ObjectMemory quit waits for ever




ObjectMemory quit waits for ever
country flaguser name
United States
2008-01-06 05:17:24
Issue status update for 
http://smalltalk.gn
u.org/node/152
Post a follow up: 
htt
p://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.




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

ObjectMemory quit waits for ever
country flaguser name
United States
2008-01-06 11:08:01
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/152
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/152

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
-Assigned to:  Unassigned
+Assigned to:  bonzinip
 Reported by:  tonyg
 Updated by:   bonzinip
 Status:       active

The loop is continuing but stdin/stdout/stderr have been
closed.  I will
change this to flushing stdin/stdout/stderr and closing the
others.

Adding a Process>>#update: message like this (and
calling it in the
program) fixes it, I will also do it.

    Process extend [
        update: aSymbol [
            aSymbol == #aboutToQuit ifTrue: [ self terminate
]
        ]

        terminateOnQuit [
            ObjectMemory addDependent: self
        ]
    ]

The default behavior however is not going to change for
backwards
compatibility.

Thanks!




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

ObjectMemory quit waits for ever
country flaguser name
United States
2008-01-06 11:17:09
Issue status update for 
http://sma
lltalk.gnu.org/project/issue/152
Post a follow up: 
htt
p://smalltalk.gnu.org/project/comments/add/152

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  bonzinip
 Reported by:  tonyg
 Updated by:   bonzinip
-Status:       active
+Status:       fixed

fixed in patch-685




_______________________________________________
help-smalltalk mailing list
help-smalltalkgnu.org

http://lists.gnu.org/mailman/listinfo/help-smalltalk

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )