Created
September 23, 2013 22:00
-
-
Save postwait/6677558 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| net_activity(vc, thread); | |
| // If there are no more bytes to write, signal write complete, | |
| ink_assert(ntodo >= 0); | |
| if (s->vio.ntodo() <= 0) { | |
| write_signal_done(VC_EVENT_WRITE_COMPLETE, nh, vc); | |
| return; | |
| } else if (!signalled) { | |
| if (write_signal_and_update(VC_EVENT_WRITE_READY, vc) != EVENT_CONT) { | |
| return; | |
| } | |
| // change of lock... don't look at shared variables! | |
| if (lock.m.m_ptr != s->vio.mutex.m_ptr) { | |
| write_reschedule(nh, vc); | |
| return; | |
| } | |
| } | |
| if (!buf.reader()->read_avail()) { | |
| write_disable(nh, vc); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment