Closed CootCraig closed 11 years ago
@CootCraig could you remove the version changes in this commit?
Did you get what I meant about moving #evented?
to the module and using that in the wait_*
methods?
@halorgium I'm removing the version change and yes I'll move #evented?
Pushed changes to the craig branch on CootCraig/celluloid-zmq
Move the evented? function to the module, Celluloid::ZMQ.evented? On the socket read, only call Celluloid::ZMQ.wait_readable if Celluloid::ZMQ.evented? Set the version back to 0.13.0 Set the celluloid-io dependency back to 0.13.0
@CootCraig I am not sure the change is being solved in the right way here. Could you jump on IRC? We can talk through the change.
Also, I just cleaned up celluloid-io.
I just got up for the day. Let me know about doing IRC. I'll fetch the latest and have a look now.
Also my read test case is working on Windows JRuby as well.
$ jruby -v jruby 1.7.4.dev (1.9.3p392) 2013-04-16 cb556ed on Java HotSpot(TM) Client VM 1.8 .0-ea-b78 +indy [Windows 2003-x86]
I have grabbed the spelling change by @halorgium and done a new branch with ZMQ::Socket#read changes. branch fix-0mq-io-wait on CootCraig/celluloid-zmq Notes: zmq.rb: removed the reactor delegators. zmq.rb: add ZMQ::evented? - Is this a Celluloid::ZMQ evented actor? zmq.rb: add ZMQ::wait_readable using the ZMQ::Reactor zmq/sockets.rb: evented? now in zmq.rb. remove Socket#evented? zmq/sockets.rb: Change Socket#read to use ZMQ#wait_readable
I have kept the evented? guard on the wait in Socket#read. This would prevent an exception if evented? fails and the 0mq socket read that follows is not evented.
I have a test script that does Socket#read with Celluloid/zmq. It is working on Ubuntu and Windows with these JRuby environments
$ jruby -v jruby 1.7.4.dev (1.9.3p392) 2013-04-16 cb556ed on Java HotSpot(TM) 64-Bit Server VM 1.8.0-ea-b80 +indy [linux-amd64]
$ jruby -v jruby 1.7.4.dev (1.9.3p392) 2013-04-16 cb556ed on Java HotSpot(TM) Client VM 1.8.0-ea-b78 +indy [Windows 2003-x86]
Also I made no changes for Socket#write.
@CootCraig sorry I missed you on IRC, timezones are hard! We have another few changes we are looking at making on top of this, I will try and get this finished and merged. I hope you get a chance to have a look at the solution, I appreciate the time taken!
See #20
A change in response to #20