Danke!

-----Ursprüngliche Nachricht-----
Von: Ulrich Klauer [mailto:ulr...@chirlu.de] 
Gesendet: Montag, 5. August 2013 19:29
An: sox-devel@lists.sourceforge.net
Betreff: Re: [SoX-devel] Sox with multiple threads?

Christian Hoene wrote:

> One question. Is sox reentrant. Can I fork a sox program and run two 
> sox chains in parallel?

When you call fork(), the address space is duplicated, so unless there are
already open files, the processes are completely independent.  
Re-entrancy, on the other hand, is hardly relevant.

I guess what you really mean is thread safety. Unfortunately, libSoX uses
some global state and is thus not completely thread-safe; even running two
different chains in parallel in a single thread may lead to problems.
However, if you
a) use the same settings (buffer size etc.) for all chains,
b) don't rely on the "subsystem" information in the message handler (either
set verbosity to 0 or use a custom handler that doesn't read the subsystem
value),
c) don't mind a bit of extra randomness (read: race conditions) in the
pseudo-random number generator, then it will probably work.

Ulrich


----------------------------------------------------------------------------
--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to