On Thu, Aug 30, 2012 at 11:25:25AM -0700, Ben Pfaff wrote: > On Fri, Aug 31, 2012 at 03:19:57AM +0900, Isaku Yamahata wrote: > > On Wed, Aug 29, 2012 at 10:18:59AM -0700, Ben Pfaff wrote: > > > On Tue, Aug 28, 2012 at 05:37:06PM +0900, Isaku Yamahata wrote: > > > > On Mon, Aug 27, 2012 at 10:10:13PM -0700, Ben Pfaff wrote: > > > > > On Wed, Aug 22, 2012 at 07:07:05PM +0900, Isaku Yamahata wrote: > > > > > > eventlet/gevent doesn't work well with select.poll because it > > > > > > blocks. > > > > > > So ovsdb python binding can't be used with eventlet/gevent. > > > > > > So monkey patch to select.poll with a function that emulate > > > > > > select.poll > > > > > > with select.select. > > > > > > > > > > > > Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> > > > > > > > > > > What's going to use this? > > > > > > > > My motivation is to use ovsdb python binding in openstack quantum which > > > > uses eventlet (I have Ryu plugin in mind, but I think other plugin can > > > > benefit) and in Ryu which uses gevent. > > > > > > Hmm. Depending on the way that the code is structured, you might be > > > able to just pass an object of a different class that simply implements > > > fd_wait, timer_wait, timer_wait_until, and immediate_wake differently. > > > Did you consider that solution? Or we could define an abstract > > > superclass for Poller with the current Poller as the default concrete > > > definition. I'd be open to that, if it would help. > > > > Then I'd like to introduce an abstract superclass. > > How about this? > > That looks OK. > > But I think you might have implied that just switching from "poll" to > "select" also fixes the problem. Is that correct?
Yes. > If so, then maybe we > should just use select everywhere. The main difference between poll and > select is performance, and performance of the Python code isn't critical > (otherwise we wouldn't write it in Python). Using select.select instead of select.poll is quite fine by me. I feared breaking existing codes that use poller by modifying poller. -- yamahata _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev