numat / RASPA2

NO LONGER UPDATED. Use the official repository.
https://github.com/iraspa/RASPA2
Other
73 stars 72 forks source link

Mac vs. Linux `join` behavior #19

Closed patrickfuller closed 8 years ago

patrickfuller commented 8 years ago

From this conversation, process.join() is behaving differently on different UNIX OS's.

The underlying reason for this should be researched. If needed, OS-specific join commands should be used.

paulboone commented 8 years ago

According to the python docs (https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Process.join), the call p.join(1) on line 106 of raspa.py means that the join should timeout after 1 second. Is there a reason why the timeout is so small? It seems like it runs the entire simulation in that one process, so that means that if the timeout is enforced, it just completes as many cycles as it can before p.terminate() is called and kills the process.

This is my first time using RASPA (and looking at the code), but it seems like making the call p.join() with no argument so you wait forever would be the correct behavior.

patrickfuller commented 8 years ago

It makes sense to me. I'll update it and push a minor revision.

patrickfuller commented 8 years ago

Revised in 21a8c3f51c7c6247eaa7523f3333edb6fd2baea7, uploaded a revision bump to pypi. pip install -U RASPA2 should work.