MCPcopy Create free account
hub / github.com/apache/trafficserver / signal_read_event

Method signal_read_event

src/proxy/http2/Http2Stream.cc:906–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906void
907Http2Stream::signal_read_event(int event)
908{
909 if (this->_sm == nullptr || this->read_vio.cont == nullptr || this->read_vio.cont->mutex == nullptr ||
910 this->read_vio.op == VIO::NONE || this->terminate_stream) {
911 return;
912 }
913
914 reentrancy_count++;
915 MUTEX_TRY_LOCK(lock, read_vio.cont->mutex, this_ethread());
916 if (lock.is_locked()) {
917 if (read_event) {
918 read_event->cancel();
919 read_event = nullptr;
920 }
921 _timeout.update_inactivity();
922 this->read_vio.cont->handleEvent(event, &this->read_vio);
923 } else {
924 if (this->_read_vio_event) {
925 this->_read_vio_event->cancel();
926 }
927 this->_read_vio_event = this_ethread()->schedule_in(this, retry_delay, event, &read_vio);
928 }
929 reentrancy_count--;
930 // Clean stream up if the terminate flag is set and we are at the bottom of the handler stack
931 terminate_if_possible();
932}
933
934void
935Http2Stream::signal_write_event(int event, bool call_update)

Callers 3

main_event_handlerMethod · 0.95
send_headersMethod · 0.95
rcv_data_frameMethod · 0.80

Calls 5

this_ethreadFunction · 0.85
update_inactivityMethod · 0.80
cancelMethod · 0.45
handleEventMethod · 0.45
schedule_inMethod · 0.45

Tested by

no test coverage detected