-
Notifications
You must be signed in to change notification settings - Fork 14
SnackSimThread
This class represents a single simulator job. It will check its job list for jobs to process and synchronize with other simulator jobs.
Max number of threads allowed
List of simulator jobs waiting to be run
Starts the thread.
Stops all current and pending jobs and kills the thread.
Adds a simulator job to the job list.
simSnacks: The simulator to add to the jobs list.
Clears all pending and running jobs.
Handles the completion of a thread's simulation.
simulator: The simulator that just finished.
Handles completion of a thread's simulation cycle.
simulator: The simulator that just completed its cycle.
Handles the exception generated by a simulator.
simulator: The simulator that generated the exception.
ex: The Exception generated.
Locks the vessel resource durations so that we can query them. Be sure to call UnlockResourceDurations when done.
Unlocks resource durations so that threads can operate on them.
Returns the vessel resource definitions for the requested vessel. Be sure to call LockResourceDurations before calling this method. Be sure to call UnlockResourceDurations after you're done.
vessel: The vessel to query
The resource durations for the specified vessel, or null if they don't exist.
Determines whether or not the simulator had to assume that converters were on.
vessel: The vessel to query
true if the simulator couldn't determine activation state and had to assume converters were on; false if not.
Removes the vessel resource durations for the specified vessel if they exist. Be sure to call LockResourceDurations before calling this method. Be sure to call UnlockResourceDurations after you're done.
vessel: The vessel that will no longer have resource durations.
Adds a simulator to the job list.
simulator: The SimSnacks simulator to add to the list.
Stops all current and pending jobs.