From: Loic Dachary <loic@dachary.org>
To: Victor Stinner <victor.stinner@gmail.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>
Subject: Bad python code : any advice ?
Date: Sun, 16 Nov 2014 21:15:09 +0100 [thread overview]
Message-ID: <546905CD.6060104@dachary.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 642 bytes --]
Hi Victor,
This week-end I wrote what I suspect to be bad python code
https://github.com/dachary/teuthology/compare/wip-container#diff-24f45fc6782fb342bf422033c01e1b06R37
and I would very much like your opinion. What I really want is a FIFO of shell commands. When the caller submits a new command, it returns immediately if wait=False or waits for it to complete if wait=True. In case wait=False, the caller can call command.wait() later on to pause until the command is complete. It's a very simple pattern and I feel my implementation is contorted.
What do you think ?
Cheers
--
Loïc Dachary, Artisan Logiciel Libre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
reply other threads:[~2014-11-16 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=546905CD.6060104@dachary.org \
--to=loic@dachary.org \
--cc=ceph-devel@vger.kernel.org \
--cc=victor.stinner@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.