Closed GoogleCodeExporter closed 9 years ago
I forgot to mention that if I add the following code in fileobject.py:sendall()
then it seems to work well for me:
Change:
self.hub.wait(self._write_event)
to:
if bytes_written < bytes_total:
self.hub.wait(self._write_event)
Not suggesting this as a viable solution to the issue (I don't know enough
about wha'ts going on in gevent, etc for that), just thought it could help with
locating the source of the issue.
Thanks :)
Original comment by mrkhings...@gmail.com
on 15 Aug 2012 at 6:55
I agree, it would be good if monkey patching made disk IO non-blocking.
Original comment by flavien....@gmail.com
on 22 Aug 2012 at 4:14
Mark, thanks, you patch is correct: there's no need to wait for write event in
sendall() if we have already written everything.
Note though, that non-blocking I/O has not effect on regular disk files. So
FileObject will not help you there, gevent.fileobject.FileObjectThreadPool
might.
Original comment by Denis.Bi...@gmail.com
on 30 Aug 2012 at 8:04
Can confirm that this is fixed for me in HEAD of gevent. And thanks for the tip
about FileObjectThreadPool - that does seem to be what I actually want (my
usage is very similar to what was asked about in:
http://stackoverflow.com/questions/11496996/python-gevent-i-dont-see-monkey-patc
hed-the-default-file-open-read-write-close)
Original comment by mark.hin...@vardr.com
on 31 Aug 2012 at 12:29
Migrated to http://github.com/SiteSupport/gevent/issues/150
Original comment by Denis.Bi...@gmail.com
on 14 Sep 2012 at 10:53
Original issue reported on code.google.com by
mrkhings...@gmail.com
on 15 Aug 2012 at 6:21Attachments: