[PD] problem making an audio-thread-safe external
B. Bogart
ben at ekran.org
Sun Oct 18 19:52:04 CEST 2009
Take a look at the code in my gphoto external (in svn)
uses sys_lock() and non-joined pthreads.
.b.
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.
>
> Hope this makes sense,
>
>
> Claude
More information about the Pd-list
mailing list