Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csoundScoreEvent thread safety

Date2008-10-20 08:44
Fromvictor
SubjectRe: [Cs-dev] csoundScoreEvent thread safety
You should use CsoundPerformanceThread::CsoundScoreEvent when
using CsoundPerformanceThread. If you do your own threading, you
have to make sure csoundPerformanceKsmps() or variants are not
called at the same time as csoundScoreEvent() (ie using locks).

Victor
----- Original Message ----- 
From: "Carlos Pita" 
To: "Developer discussions" 
Sent: Monday, October 20, 2008 1:50 AM
Subject: [Cs-dev] csoundScoreEvent thread safety


> Hi,
>
> the last example in Rory Walsh's intro to the csound api creates a
> csound thread and then calls csoundScoreEvent from the main thread
> without taking further precautions, while
> CsoundPerformanceThread::ScoreEvent implementation enqueues a message
> that is later unqueued by the performance thread, all in a perfect
> thread-safe way. What is the real truth? Is csoundScoreEvent
> thread-safe or not? In general, what thread safety warranties can be
> assumed for the api?
>
> Best regards
> -Carlos
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's 
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great 
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the 
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net