JuliaLang/julia — pull request #3394 by amitmurthy (2013-06-14 11:24:30+00:00)
Title: RFC : process ids are independent of nprocs() and others

This patch is a starting point for cleanly removing workers :

- process ids are now independent of nprocs().
- ```rmprocs()``` removes specified list of processes.
- death of worker process results in it being cleanly removed
- ```list_allprocs()``` gives the list of valid processors
- ```list_workers()``` is the above minus the client process (pid 1)
- application code written using ```for pid in 1:nprocs()``` will break. It needs to be changed to ```for pid in list_allprocs()``` or ```for pid in list_workers()```

To be done:
- RemoteRefs related to the exited worker are currently not being notified or cleaned up.
I could not follow all the various data structures from where they have to be removed. Need some help here.

- NOT throwing an exception when the socket connection breaks due to an exiting worker results in a seg fault in the client (console) process.