#define DEFAULT_WORKING_THREADS 2
-#define PERSISTENT_THREADS //If defined, threads will not be continually destroyed and then respawned
+//#define PERSISTENT_THREADS //If defined, threads will not be continually destroyed and then respawned
+
+
//Undefine default macros, replace with functions
#undef Simulation_Run
void * Compute_Thread(void * system); //Thread - Continuously perform computations for a System of bodies. May spawn additional worker threads.
+#ifdef PERSISTENT_THREADS
+void * Worker_Thread(void * arg);
+#else
void * Force_Thread(void * system); //Thread - Compute forces for all objects in a system
void * Position_Thread(void * system); //Thread - Compute positions for all objects in a system
-
-
+#endif //PERSISTENT_THREADS
void Thread_Cleanup(void); //Called at program exit to safely join computation thread