Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Zac Medico <zmedico@g.o>
Subject: Re: multiprocessing.eclass: doing parallel work in bash
Date: Sat, 02 Jun 2012 15:50:06 -0700
On 06/02/2012 02:31 PM, Michał Górny wrote:
> On Sat, 2 Jun 2012 15:54:03 -0400
> Mike Frysinger <vapier@g.o> wrote:
> 
>> # @FUNCTION: redirect_alloc_fd
>> # @USAGE: <var> <file> [redirection]
>> # @DESCRIPTION:
> 
> (...and a lot of code)
> 
> I may be wrong but wouldn't it be simpler to just stick with a named
> pipe here? Well, at first glance you wouldn't be able to read exactly
> one result at a time but is it actually useful?

I'm pretty sure that the pipe has remain constantly open in read mode
(which can only be done by assigning it a file descriptor). Otherwise,
there's a race condition that can occur, where a write is lost because
it's written just before the reader closes the pipe.
-- 
Thanks,
Zac


References:
multiprocessing.eclass: doing parallel work in bash
-- Mike Frysinger
Re: multiprocessing.eclass: doing parallel work in bash
-- Mike Frysinger
Re: multiprocessing.eclass: doing parallel work in bash
-- Michał Górny
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: multiprocessing.eclass: doing parallel work in bash
Next by thread:
Re: multiprocessing.eclass: doing parallel work in bash
Previous by date:
Re: multiprocessing.eclass: doing parallel work in bash
Next by date:
Re: multiprocessing.eclass: doing parallel work in bash


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.