matplotlib

This Page

simx.process module

class simx.process.Process

Bases: object

Base class for all processes in simx. Provides functionality for process oriented simulation

end()

Called by SimX process manager when a process is terminated. Should _never_ be directly called by the user. Can’t use Python destructor __del__ method for this, since __del__ might not be called when a process is deleted (due to Python’s reference counting mechanism)

end_()

Called by simx process manager when a process is terminated. Should never be directly called by the user

kill(process)

kills process.

kill_all(process)

Kills process and all its sub processes (process tree).

run()

All classes that inherit from Process class should define this method. This is the method that gets run when the process is activated. This method should _never_ be directly called by the user.

sleep(duration)

Suspends for specified amount of time. Duration has to be atleast one second

spawn(process)

Spawns a process and continues executing

waitfor(process)

Suspends process till the given process finishes executing.

waiton(resource)

Waits on a resource.