Thanks for the heads up Palli.
I was using "real-time" in the sense of a process running continuously with 
new data coming in, flowing through signal processing chains and being 
displayed and recorded, rather than being absolutely time critical. If a 
Julia gc causes a momentary delay in one or more of the channels, that 
should not be a problem.

I agree that real-time isn't strictly about performance because the data is 
flowing through the system in a time limited way so all is ok so long as it 
is keeping up over the medium term.

But in our system, the same code is also used offline when opening files, 
and in this case the user has to wait around. So far I have found signal 
processing components implemented with Julia scripts to be within 10% of 
their C++ equivalents in performance.

On Wednesday, August 10, 2016 at 11:34:54 PM UTC+12, Páll Haraldsson wrote:
>
> On Wednesday, August 10, 2016 at 6:57:15 AM UTC, Kit Adams wrote:
>>
>> I am investigating the feasibility of embedding Julia in a C++ real-time 
>> signal processing framework, using Julia-0.4.6 (BTW, the performance is 
>> looking amazing).
>>
>
> There are other thread[s] on Julia and real-time, I'll not repeat here. 
> You are ok with Julia for real-time work? Julia strictly isn't real-time, 
> you just have to be careful.
>
> I'm not looking into your embedding/GC issues as I'm not too familiar 
> with. Seems to me embedding doesn't fundamentally change that the GC isn't 
> real-time. And real-time isn't strictly about the performance.
>
>
>> However, for this usage I need to retain Julia state variables across c++ 
>> function calls, so the stack based JL_GC_PUSH() and JL_GC_POP() are not 
>> sufficient. 
>> When I injected some jl_gc_collect() calls for testing purposes, to 
>> simulate having multiple Julia scripts running (from the same thread), I 
>> got crashes, which I was able to fix using e.g. jl_gc_preserve(mMyState); 
>> and appropriate matching jl_gc_unpreserve() calls.
>>
>> I see these functions have been removed from the latest Julia version. 
>>
>> Is there an alternative that allows Julia values to be retained in a C++ 
>> app across gc calls?
>>
>
> -- 
> Palli.
>  
>

Reply via email to