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: Michał Górny <mgorny@g.o>
Subject: Re: multiprocessing.eclass: doing parallel work in bash
Date: Sun, 3 Jun 2012 09:15:22 +0200
On Sat, 02 Jun 2012 18:04:41 -0700
Zac Medico <zmedico@g.o> wrote:

> #!/usr/bin/env bash
> named_pipe=$(mktemp -d)/fifo
> 
> (
> 	# hold the pipe open in read mode, so
> 	# the writer doesn't block
> 	sleep 3
> ) < "$named_pipe" &

I don't understand this part. This keeps the pipe open for reading
which obviously causes it to lose data. If you open it, you need to
read all that is there and then close.

And writers are supposed to be blocked. They are forked and just write
when done, so there's no problem with keeping them alive for a short
while.

-- 
Best regards,
Michał Górny
Attachment:
signature.asc (PGP signature)
Replies:
Re: multiprocessing.eclass: doing parallel work in bash
-- Zac Medico
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
Re: multiprocessing.eclass: doing parallel work in bash
-- Zac Medico
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.