On Sun, 18 Oct 2009, Claude Heiland-Allen wrote:
Ivica Ico Bukvic wrote:
iret1 = pthread_create( &thread, NULL, cwiid_pthread2_setRumble, (void*) &rPars);
This creates a new thread.
pthread_join(thread, NULL);
This waits (blocking Pd's main thread) until the new thread terminates. So, why create a new thread only to immediately wait for it to terminate - that makes the program essentially behave in a single threaded way.
But if ever there's any way that this gets to run in a multithreaded way, then the post() in cwiid_pthread2_setRumble will violate the singlethreadedness of <m_pd.h> because sys_lock() is not being used.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801