[Bf-blender-cvs] [762a4b5] soc-2014-fluid: manta tun is separate thread
Roman Pogribnyi
noreply at git.blender.org
Fri Jul 25 22:34:17 CEST 2014
Commit: 762a4b57a8174bae0b54031abee58655f1ecf08b
Author: Roman Pogribnyi
Date: Thu Jul 24 14:54:32 2014 +0200
Branches: soc-2014-fluid
https://developer.blender.org/rB762a4b57a8174bae0b54031abee58655f1ecf08b
manta tun is separate thread
===================================================================
M intern/smoke/intern/MANTA.h
===================================================================
diff --git a/intern/smoke/intern/MANTA.h b/intern/smoke/intern/MANTA.h
index c86bbd3..af050c3 100644
--- a/intern/smoke/intern/MANTA.h
+++ b/intern/smoke/intern/MANTA.h
@@ -168,8 +168,7 @@ static void add_mesh_transform_method(stringstream& ss)
" obj.offset(vec3(res/2, res/2, res/2))\n\n";
}
-//void *run_manta_scene(void *threadid)
-void run_manta_scene()
+void *run_manta_scene(void *threadid)
{
//PyInterpreterState *st = PyThreadState_GET()->interp;
//PyThreadState *ts = Py_NewInterpreter();
@@ -378,10 +377,9 @@ static void generate_manta_sim_file(Scene *scene, SmokeModifierData *smd)
}
manta_setup_file << ss.rdbuf();
manta_setup_file.close();
- run_manta_scene();
-// pthread_t manta_thread;
-// int rc = pthread_create(&manta_thread, NULL, run_manta_scene, NULL);
-// pthread_detach(manta_thread);
+ pthread_t manta_thread;
+ int rc = pthread_create(&manta_thread, NULL, run_manta_scene, NULL);
+ pthread_detach(manta_thread);
}
#endif /* MANTA_H */
More information about the Bf-blender-cvs
mailing list