mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 11:09:41 +00:00
Switch vals to thread_locals
It's not possible to share them across threads, so in case we decide to use multithreading in the future, it's best to mark them as thread_local right away, even if it's a no-op right now.
This commit is contained in:
committed by
Ingvar Stepanyan
parent
f1cd6a87da
commit
e342766cbf
@@ -55,7 +55,7 @@ int version() {
|
||||
return version;
|
||||
}
|
||||
|
||||
const val Uint8Array = val::global("Uint8Array");
|
||||
thread_local const val Uint8Array = val::global("Uint8Array");
|
||||
|
||||
val encode(std::string image_in, int image_width, int image_height, MozJpegOptions opts) {
|
||||
uint8_t* image_buffer = (uint8_t*)image_in.c_str();
|
||||
|
||||
Reference in New Issue
Block a user