Csound Csound-dev Csound-tekno Search About

[Cs-dev] starting/stopping performance thread...

Date2008-06-11 12:04
FromRory Walsh
Subject[Cs-dev] starting/stopping performance thread...
Can anyone advise me on the best way to start and stop performance 
threads. I've been using the pause method which works fine but recently 
I've been wanting to stop a performance, change the CsOptions, recompile 
and then run it again with the same thread object. What must I do after 
calling the performance thread Stop() method in order to start the 
thread again?

Rory.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 13:13
FromVictor Lazzarini
SubjectRe: [Cs-dev] starting/stopping performance thread...
For stoppoing, you should call CsoundPerformanceThread::Stop() and
then CsoundPerformanceThread()::Join(). Then you can proceed to
recompile.

Victor

At 12:04 11/06/2008, you wrote:
>Can anyone advise me on the best way to start and stop performance
>threads. I've been using the pause method which works fine but recently
>I've been wanting to stop a performance, change the CsOptions, recompile
>and then run it again with the same thread object. What must I do after
>calling the performance thread Stop() method in order to start the
>thread again?
>
>Rory.
>
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 14:06
FromRory Walsh
SubjectRe: [Cs-dev] starting/stopping performance thread...
Thanks Victor, but doing that just causes my application to hang 
indefinitely. I didn't try any recompile yet, I simply tried the following:

1 - Start the performance thread with CsoundPerformanceThread::Play()
2 - Stop the performance thread with CsoundPerformanceThread::Stop()
3 - Join the thread with CsoundPerformanceThread::Join()

Step 3 causes the application to hang. I tried to retrieve the value 
being output by Join() but I can't even get that as it hangs before 
returning a value. I'm not working with the latest pthread 
implementation as I'm using a slightly older version of Csound.

Rory.

p.s. Spain looked impressive yesterday, are you still backing Portugal?

Victor Lazzarini wrote:
> For stoppoing, you should call CsoundPerformanceThread::Stop() and
> then CsoundPerformanceThread()::Join(). Then you can proceed to
> recompile.
> 
> Victor
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 14:32
FromVictor Lazzarini
SubjectRe: [Cs-dev] starting/stopping performance thread...
Join() would hang until the thread function exits. So make sure Stop()
is doing its job.

Victor

Ps.: yes, still backing Portugal, but Germany will win it.

At 14:06 11/06/2008, you wrote:
>Thanks Victor, but doing that just causes my application to hang
>indefinitely. I didn't try any recompile yet, I simply tried the following:
>
>1 - Start the performance thread with CsoundPerformanceThread::Play()
>2 - Stop the performance thread with CsoundPerformanceThread::Stop()
>3 - Join the thread with CsoundPerformanceThread::Join()
>
>Step 3 causes the application to hang. I tried to retrieve the value
>being output by Join() but I can't even get that as it hangs before
>returning a value. I'm not working with the latest pthread
>implementation as I'm using a slightly older version of Csound.
>
>Rory.
>
>p.s. Spain looked impressive yesterday, are you still backing Portugal?
>
>Victor Lazzarini wrote:
> > For stoppoing, you should call CsoundPerformanceThread::Stop() and
> > then CsoundPerformanceThread()::Join(). Then you can proceed to
> > recompile.
> >
> > Victor
> >
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-06-11 14:46
FromRory Walsh
SubjectRe: [Cs-dev] starting/stopping performance thread...
I'm not sure how I can check that Stop() is doing it's job as it does 
not return anything. It certainly stops the performance, that much I can 
hear but how can I be sure it's working properly?

Rory.

p.s. I missed the German match so I can't comment on them until I see 
them play. Holland didn't play too bad the other night either..

Victor Lazzarini wrote:
> Join() would hang until the thread function exits. So make sure Stop()
> is doing its job.
> 
> Victor
> 
> Ps.: yes, still backing Portugal, but Germany will win it.
> 
> At 14:06 11/06/2008, you wrote:
>> Thanks Victor, but doing that just causes my application to hang
>> indefinitely. I didn't try any recompile yet, I simply tried the following:
>>
>> 1 - Start the performance thread with CsoundPerformanceThread::Play()
>> 2 - Stop the performance thread with CsoundPerformanceThread::Stop()
>> 3 - Join the thread with CsoundPerformanceThread::Join()
>>
>> Step 3 causes the application to hang. I tried to retrieve the value
>> being output by Join() but I can't even get that as it hangs before
>> returning a value. I'm not working with the latest pthread
>> implementation as I'm using a slightly older version of Csound.
>>
>> Rory.
>>
>> p.s. Spain looked impressive yesterday, are you still backing Portugal?
>>
>> Victor Lazzarini wrote:
>>> For stoppoing, you should call CsoundPerformanceThread::Stop() and
>>> then CsoundPerformanceThread()::Join(). Then you can proceed to
>>> recompile.
>>>
>>> Victor
>>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> Victor Lazzarini
> Music Technology Laboratory
> Music Department
> National University of Ireland, Maynooth 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net