You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am porting zarr with numcodecs into Pyodide (see here pyodide/pyodide#938), since pthread is not yet supported I have to disable it.
I applied the following patch to blosc and it seems to be working.
diff --git a/c-blosc/blosc/blosc.h b/c-blosc/blosc/blosc.h
index 40857d0..8a1e969 100644
--- a/c-blosc/blosc/blosc.h+++ b/c-blosc/blosc/blosc.h@@ -50,7 +50,7 @@ extern "C" {
((INT_MAX - BLOSC_MAX_TYPESIZE * sizeof(int32_t)) / 3)
/* The maximum number of threads (for some static arrays) */
-#define BLOSC_MAX_THREADS 256+#define BLOSC_MAX_THREADS 1
/* Codes for shuffling (see blosc_compress) */
#define BLOSC_NOSHUFFLE 0 /* no shuffle */
diff --git a/c-blosc/blosc/blosc.c b/c-blosc/blosc/blosc.c
index a5a5bd5..2a7797c 100644
--- a/c-blosc/blosc/blosc.c+++ b/c-blosc/blosc/blosc.c@@ -2236,6 +2236,7 @@ void blosc_atfork_child(void) {
void blosc_init(void)
{
+ g_initlib = 1;
/* Return if we are already initialized */
if (g_initlib) return;
However, I am quite certain that this is not the best way to do it. Can someone here provide some advice on how to properly disable pthread? It would be even better if we can have a build flag that I can controlled in setup.py.
The text was updated successfully, but these errors were encountered:
Would suggest following up with the Blosc team. As to Numcodecs, we may soon just rely on Blosc to be packaged independently. See issue ( #262 ) for context.
Hi, I am porting zarr with numcodecs into Pyodide (see here pyodide/pyodide#938), since pthread is not yet supported I have to disable it.
I applied the following patch to blosc and it seems to be working.
However, I am quite certain that this is not the best way to do it. Can someone here provide some advice on how to properly disable pthread? It would be even better if we can have a build flag that I can controlled in
setup.py
.The text was updated successfully, but these errors were encountered: