posix_mq RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.posix.mq@librelist.org
Subject: [RFC] try* interfaces in posix_mq 0.8.0pre
Date: Mon, 28 Feb 2011 00:23:02 +0100	[thread overview]
Message-ID: <AANLkTikD6qtAdaVRhZjzc7qL=EADgG_3tdAKFm=w0=X4@mail.gmail.com> (raw)
In-Reply-To: AANLkTins0SjXeC6XBczdWakMo1e5pQSd9mo9EkjQ+E2e@mail.gmail.com

2011/2/27 Eric Wong <normalperson@yhbt.net>:
> Thanks!  Any comments/suggestions on the interface?

It looks just correct IMHO. Just one question: how about << method?
Currently it behaves as POSIX_MQ#send method (raises in non-blocking
mode id it cannot write) but it returns the POSIX_MQ instance itself
when success. I suggest that it could return true on success (as you
suggest for send method).
However it could also possible that << would behave as trysend
(returning true/false), but it would break backward compatiiblity.


> Thinking about it more, I really want to make POSIX_MQ#send return
> "true" on success now (and just raise on errors) for consistency with
> POSIX_MQ#trysend.

Sure.


> I doubt anyone actually checks the return value of POSIX_MQ#send...
> Maybe I'll change it and call the next release 1.0.0.

I don't check it as for now it doesn't make sense (nil says nothing,
and I already rescue the possible exceptions).



Regards.

--
Iñaki Baz Castillo
<ibc@aliax.net>

  parent reply	other threads:[~2011-02-27 23:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27 11:26 [RFC] try* interfaces in posix_mq 0.8.0pre Eric Wong
2011-02-27 14:44 ` Iñaki Baz Castillo
2011-02-27 15:01   ` Iñaki Baz Castillo
2011-02-27 16:15     ` Iñaki Baz Castillo
     [not found]       ` <20110227222400.GB31726@dcvr.yhbt.net>
     [not found]         ` <AANLkTins0SjXeC6XBczdWakMo1e5pQSd9mo9EkjQ+E2e@mail.gmail.com>
2011-02-27 23:23           ` Iñaki Baz Castillo [this message]
2011-02-27 23:51             ` Eric Wong
2011-02-27 22:27     ` Eric Wong

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

  List information: https://yhbt.net/ruby_posix_mq/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTikD6qtAdaVRhZjzc7qL=EADgG_3tdAKFm=w0=X4@mail.gmail.com' \
    --to=ibc@aliax.net \
    --cc=ruby.posix.mq@librelist.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_posix_mq.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).