Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mutex to save context #46

Merged
merged 2 commits into from Jun 2, 2020
Merged

add mutex to save context #46

merged 2 commits into from Jun 2, 2020

Conversation

kumagi
Copy link
Collaborator

@kumagi kumagi commented May 29, 2020

fixes #43
Appended mutex to avoid race condition in threaded mode.
Most dangerous part is handling subresources(subresource_fetch_handler), because every subresources could arrive simultaneously.
So I appended mutex lock and unlock.

note: Nginx seems to support Windows environment, but wrapped API's (ngx_thread_mutex_t) is not exposed to plugin developers. And originally, this module does not support Windows.

@kumagi kumagi requested review from twifkak and gaul May 29, 2020 07:23
@kumagi kumagi self-assigned this May 29, 2020
ngx_http_sxg_filter_module.c Outdated Show resolved Hide resolved
ngx_http_sxg_filter_module.c Show resolved Hide resolved
ngx_http_sxg_filter_module.c Show resolved Hide resolved
ngx_http_sxg_filter_module.c Outdated Show resolved Hide resolved
ngx_http_sxg_filter_module.c Outdated Show resolved Hide resolved
ngx_http_sxg_filter_module.c Outdated Show resolved Hide resolved
ngx_http_sxg_filter_module.c Show resolved Hide resolved
ngx_http_sxg_filter_module.c Show resolved Hide resolved
@kumagi kumagi requested a review from gaul June 1, 2020 11:03
ngx_http_sxg_filter_module.c Outdated Show resolved Hide resolved
@kumagi kumagi merged commit 1178bde into master Jun 2, 2020
@kumagi kumagi deleted the add_mutex branch June 2, 2020 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make subresource handling thread safe
2 participants