From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Christian Hoene" Newsgroups: gmane.comp.audio.sox.devel Subject: Re: Sox with multiple threads? Date: Tue, 6 Aug 2013 03:34:55 +0200 Message-ID: <000601ce9245$28e30b50$7aa921f0$@symonics.com> References: <003001ce912d$0eaf7a20$2c0e6e60$@symonics.com> <20130805192909.Horde.shFoKtY3aZLr6gNjs7trXw2@webmail.df.eu> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375732646 18472 80.91.229.3 (5 Aug 2013 19:57:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Aug 2013 19:57:26 +0000 (UTC) To: Original-X-From: sox-devel-bounces@lists.sourceforge.net Mon Aug 05 21:57:27 2013 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of symonics.com designates 67.222.38.55 as permitted sender) client-ip=67.222.38.55; envelope-from=christian.hoene@symonics.com; helo=oproxy5.bluehost.com; In-Reply-To: <20130805192909.Horde.shFoKtY3aZLr6gNjs7trXw2@webmail.df.eu> X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJRm46bifhAxQam+IME7dt0LFpEWgH4f23tmHGPKqA= Content-Language: de X-Identified-User: {1573:box785.bluehost.com:soniconb:symonics.com} {sentby:smtp auth 109.192.195.32 authed with christian.hoene@symonics.com} X-Spam-Score: 3.8 (+++) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [67.222.38.55 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 2.4 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM X-Headers-End: 1V6Qu4-0001rP-Nx X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:308 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V6QuC-0004Ty-8o for gcasd-sox-devel@m.gmane.org; Mon, 05 Aug 2013 21:57:24 +0200 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1V6QuA-0005Gp-KH; Mon, 05 Aug 2013 19:57:22 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1V6Qu8-0005Gh-9v for sox-devel@lists.sourceforge.net; Mon, 05 Aug 2013 19:57:20 +0000 Received: from oproxy5-pub.bluehost.com ([67.222.38.55] helo=oproxy5.bluehost.com) by sog-mx-2.v43.ch3.sourceforge.com with smtp (Exim 4.76) id 1V6Qu4-0001rP-Nx for sox-devel@lists.sourceforge.net; Mon, 05 Aug 2013 19:57:20 +0000 Received: (qmail 19504 invoked by uid 0); 5 Aug 2013 19:30:30 -0000 Received: from unknown (HELO box785.bluehost.com) (66.147.244.85) by oproxy5.bluehost.com with SMTP; 5 Aug 2013 19:30:30 -0000 Received: from [109.192.195.32] (port=50632 helo=samsung7PC) by box785.bluehost.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.80) (envelope-from ) id 1V6QU9-0004wI-IN for sox-devel@lists.sourceforge.net; Mon, 05 Aug 2013 13:30:29 -0600 Danke! -----Urspr=FCngliche Nachricht----- Von: Ulrich Klauer [mailto:ulrich@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=3D49501711&iu=3D/4140/ostg.cl= ktrk _______________________________________________ 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=3D49501711&iu=3D/4140/ostg.cl= ktrk