celluloid / celluloid-io

UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
https://celluloid.io
MIT License
879 stars 93 forks source link

added spec for writing later to a socket within a request/response cycle... #98

Closed HoneyryderChuck closed 8 years ago

HoneyryderChuck commented 10 years ago

... using the timer primitives (this spec fails currently)

This spec is a response to the thread from the google group:

https://groups.google.com/forum/#!topic/celluloid-ruby/-0At7Sx0CHw

HoneyryderChuck commented 10 years ago

Managed to get a spec earlier than expected. Hope it helps :)

tarcieri commented 10 years ago

Thanks for this! This should be enough to help me debug the problem.

However, for bonus points, can you write a version of this that reproduce the problem against Celluloid itself using only EventedMailbox?

HoneyryderChuck commented 10 years ago

Humm, not very familiar with the mailbox API... don't know exactly what to spec there. Could you provide a theory of where this might be an issue? This one might take some more time for me, though

tarcieri commented 10 years ago

You might look to #56 as the root cause. Originally the problem was that EventedMailbox could not differentiate between events (I/O or otherwise) and timeouts. That much was fixed in https://github.com/celluloid/celluloid/commit/bf37c11705d1b0d9470b0dc5a0edb17f91c93a43 by having mailboxes raise Celluloid::TimeoutError in the event of a timeout, rather than returning nil.

There's ostensibly other changes required to recalculate the loop timeout.

ioquatix commented 8 years ago

I'm going to merge this spec, it seems reasonable, if it's failing it should be addressed in another PR.

digitalextremist commented 8 years ago

:+1: