File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -210,22 +210,23 @@ def __exit__(self, *exc_info):
210
210
211
211
212
212
def _can_start_thread () -> bool :
213
- """Detect if Python can start new threads
213
+ """Detect if Python can start new threads.
214
214
215
215
Some WebAssembly platforms do not provide a working pthread
216
216
implementation. Thread support is stubbed and any attempt
217
217
to create a new thread fails.
218
218
219
- - wasm32-wasi does not have threading
219
+ - wasm32-wasi does not have threading.
220
220
- wasm32-emscripten can be compiled with or without pthread
221
- support. (-s USE_PTHREADS / __EMSCRIPTEN_PTHREADS__).
221
+ support (-s USE_PTHREADS / __EMSCRIPTEN_PTHREADS__).
222
222
"""
223
223
if sys .platform == "emscripten" :
224
224
try :
225
225
_thread .start_new_thread (lambda : None , ())
226
226
except RuntimeError :
227
227
return False
228
- return True
228
+ else :
229
+ return True
229
230
elif sys .platform == "wasi" :
230
231
return False
231
232
else :
You can’t perform that action at this time.
0 commit comments