cvm-rs: Switch thread pool to rayon

Much less underhanded than using an IO library's capability to do so. Also, rayon will make encoding multiple jpegs in parallel *much* easier.

tbh if i do that I may also switch to napi-rs, it seems a bit less painful and supports much more async shenigans.

(Also, it will actually bind classes properly... something Neon really sucks at unless you look at strange documentation.)
This commit is contained in:
modeco80
2024-08-20 04:10:40 -04:00
parent a521f4c873
commit 55566fbd3a
3 changed files with 74 additions and 107 deletions

View File

@@ -14,5 +14,5 @@ libc = "0.2.155"
# Required for JPEG
once_cell = "1.19.0"
tokio = { version = "1.38.0", features = [ "rt", "rt-multi-thread" ] }
turbojpeg-sys = "1.0.0"
rayon = "1.10.0"