[GOODIE] suggestions wanted re: Process Browser

Ned Konz ned at bike-nomad.com
Sun Jul 9 03:54:01 UTC 2000


Well, I decided to write a simple Morphic app as my first taste of
Morphic programming.
So I wrote a Process Browser. It's a simple little app that displays
three panes:
in the upper right-hand corner, a list of currently running Processes,
in the upper
right hand, a stack display of the currently selected Process, and in
the bottom
half, the method being executed in the currently selected slot of the
current
stack display.

This all works.

However, it isn't too useful without the other tools that go with it
(I'm writing
this from memory, based on a tool I used in a prior life). These include
the ability
to inspect the selected Process (easily done), to search for a given
context
among the Processes (also easily done), and the two that I haven't been
able to 
manage yet:

	* interrupt the currently selected Process so you can open up a
debugger
on it then proceed and continue running it

	* terminate the currently selected Process

In VisualWorks, the interrupting was done using a handy method
Process>>interruptWith:
that took a block argument. You'd just raise an exception in the block,
then the
debugger would handle it.

However, I haven't been able to get this to work (VW added a Semaphore
to each Process
to ensure that (a) multiple interruptWith: calls would not collide, and
(b) a Process
could temporarily avoid being interrupted). I _have_ tried adding a
Semaphore, etc.
to Process, but haven't been able to figure out the incantations
necessary to get
interruptWith: to work.

Also, Process>>terminate doesn't seem to work correctly (sometimes, but
not all the time).

SO: has anyone extended/modified Process to allow for interruptWith: to
work?

AND: has anyone gotten Process>>terminate to work reliably on arbitrary
Processes

AND: do you know how to fire up the Debugger on an arbitrary Process (VW
also had
a simple little method called Process>>debug that would do just that)...

I've enclosed a change set for what I have already have (just Morphic
for now).
I'd be interested in your input...

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProcessBrowser.1.cs
Type: application/octet-stream
Size: 6752 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000708/87900660/ProcessBrowser.1.obj


More information about the Squeak-dev mailing list