diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-09-18 18:30:58 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-09-18 18:30:58 +0300 |
commit | 9bacd21405de021fa846bac95b7e3fb796763a80 (patch) | |
tree | 5ce6afa71cb69ecb6659e350e7d842c8b0e8c82a /src/nxt_conn_proxy.c | |
parent | ca01845d89968ef8b726f8e4a683a06c518755e4 (diff) | |
download | unit-9bacd21405de021fa846bac95b7e3fb796763a80.tar.gz unit-9bacd21405de021fa846bac95b7e3fb796763a80.tar.bz2 |
Protecting context structures with mutex.
By design, Unit context is created for the thread which reads messages from
the router. However, Go request handlers are called in a separate goroutine
that may be executed in a different thread. To avoid a racing condition,
access to lists of free structures in the context should be serialized. This
patch should fix random crashes in Go applications under high load.
This is related to #253 and #309 issues on GitHub.
Diffstat (limited to 'src/nxt_conn_proxy.c')
0 files changed, 0 insertions, 0 deletions