mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 04:31:44 +00:00
A thread may run immediately after it's created. Trying to pass parameter to thread using uwsgi_thread->data without preventing the thread from accessing it first is a race condition. If the thread accesses uwsgi_thread->data first, uwsgi gets killed by SIGSEGV. This patch creates a new function uwsgi_thread_new_with_data() to assign user provided data to uwsgi_thread->data before the thread is created.