28 Feb 00:23
[RFC] try* interfaces in posix_mq 0.8.0pre
Iñaki Baz Castillo <ibc <at> aliax.net>
2011-02-27 23:23:02 GMT
2011-02-27 23:23:02 GMT
2011/2/27 Eric Wong <normalperson <at> 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 <at> aliax.net>
RSS Feed