[PATCH 1 of 3] QUIC: post stream events instead of calling their handlers
Roman Arutyunyan
arut at nginx.com
Thu Nov 25 14:20:49 UTC 2021
# HG changeset patch
# User Roman Arutyunyan <arut at nginx.com>
# Date 1637692791 -10800
# Tue Nov 23 21:39:51 2021 +0300
# Branch quic
# Node ID 5b03ffd757804542daec73188a509b02e6b2c596
# Parent d041b8d6ab0b2dea150536531345fa47c696b303
QUIC: post stream events instead of calling their handlers.
This potentially reduces the number of handler calls.
diff --git a/src/event/quic/ngx_event_quic_streams.c b/src/event/quic/ngx_event_quic_streams.c
--- a/src/event/quic/ngx_event_quic_streams.c
+++ b/src/event/quic/ngx_event_quic_streams.c
@@ -1122,7 +1122,7 @@ ngx_quic_handle_stream_frame(ngx_connect
rev->ready = 1;
if (rev->active) {
- rev->handler(rev);
+ ngx_post_event(rev, &ngx_posted_events);
}
}
@@ -1369,7 +1369,7 @@ ngx_quic_handle_reset_stream_frame(ngx_c
}
if (rev->active) {
- rev->handler(rev);
+ ngx_post_event(rev, &ngx_posted_events);
}
return NGX_OK;
@@ -1438,7 +1438,7 @@ ngx_quic_handle_stop_sending_frame(ngx_c
wev = qs->connection->write;
if (wev->active) {
- wev->handler(wev);
+ ngx_post_event(wev, &ngx_posted_events);
}
return NGX_OK;
More information about the nginx-devel
mailing list