nghttpx: Only use thread_local if NOTHREADS is not defined
This commit is contained in:
parent
d3ca003346
commit
0d1ebd73de
|
@ -32,7 +32,10 @@ WorkerConfig::WorkerConfig()
|
||||||
errorlog_tty(false)
|
errorlog_tty(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
thread_local WorkerConfig worker_config;
|
#ifndef NOTHREADS
|
||||||
|
thread_local
|
||||||
|
#endif // NOTHREADS
|
||||||
|
WorkerConfig worker_config;
|
||||||
|
|
||||||
} // namespace shrpx
|
} // namespace shrpx
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,11 @@ struct WorkerConfig {
|
||||||
};
|
};
|
||||||
|
|
||||||
// We need WorkerConfig per thread
|
// We need WorkerConfig per thread
|
||||||
extern thread_local WorkerConfig worker_config;
|
extern
|
||||||
|
#ifndef NOTHREADS
|
||||||
|
thread_local
|
||||||
|
#endif // NOTHREADS
|
||||||
|
WorkerConfig worker_config;
|
||||||
|
|
||||||
} // namespace shrpx
|
} // namespace shrpx
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue