[Pharo-users] Kill all non-essential processes in one go?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Pharo-users] Kill all non-essential processes in one go?

Stefan Marr-4
Hi:

Is there an easy way to kill all non-essential processes in an image?

Some of my unit tests spawn a huge number of new processes, and I want to get rid of them easily when there was an error anywhere.

Any ideas?

To be able to select multiple items in the process browser would be a great start...

Thanks
Stefan

--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 3956
Fax:   +32 2 629 3525


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Kill all non-essential processes in one go?

Michael Roberts-2
If you can give each process a name, then you can do something like this?

10 timesRepeat: [
        [(Delay forSeconds: 20) wait] forkNamed: 'Test process'].

(Process allSubInstances select: [:each |
        each name = 'Test process']) do: [:each |
                each terminate]

cheers,
Mike

On Sat, Jan 23, 2010 at 6:23 PM, Stefan Marr <[hidden email]> wrote:

> Hi:
>
> Is there an easy way to kill all non-essential processes in an image?
>
> Some of my unit tests spawn a huge number of new processes, and I want to get rid of them easily when there was an error anywhere.
>
> Any ideas?
>
> To be able to select multiple items in the process browser would be a great start...
>
> Thanks
> Stefan
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 3956
> Fax:   +32 2 629 3525
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Kill all non-essential processes in one go?

Mariano Martinez Peck
In reply to this post by Stefan Marr-4


On Sat, Jan 23, 2010 at 7:23 PM, Stefan Marr <[hidden email]> wrote:
Hi:

Is there an easy way to kill all non-essential processes in an image?


The problem is...what is "non-essential" ?
 
Some of my unit tests spawn a huge number of new processes, and I want to get rid of them easily when there was an error anywhere.


Processes are objects as everything. So I guess if they should be garbageCollected if nobody uses it. Did you try a Smalltalk garbageCollect ?
 
Any ideas?


ProcessorScheduler >> anyProcessesAbove: highestPriority
 
You can get all the processes lower to a certain priority. Then you can just send the terminate message to each of them. But this make sense if the priority of your processes are low.


To be able to select multiple items in the process browser would be a great start...

Thanks
Stefan

--
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 3956
Fax:   +32 2 629 3525


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users