Closed LGoodacre closed 1 year ago
@arai-a
mozilla-central/media/ffvpx/compat/w32pthreads.h
is unrelated here, and this is not issue around outside-of-spidermonkey dependency.
pthread is POSIX thread, and it may not be available on windows (except for cygwin etc).
To create threads on windows, you'll need to call Win32 API equivalent or something (_beginthreadex
maybe).
I'm not sure which one is modern way (my knowledge is from 10+ years ago), but I'll look into making the code windows compatible.
I see. Is it possible to do it with std::async?
The new worker.cpp example looks great, but unfortunately I can't get it to compile, because the call to
pthread_create()
is unresolved. I tracked down this function down tomozilla-central/media/ffvpx/compat/w32pthreads.h
, but if I include this file, I just get more missing dependencies. Perhaps this is part of the mozilla framework, but not part of Spidermonkey? Ordinarily this would be OK, but since this repository is specifically aimed at Spidermonkey embedders, it seems like a bit of a problem. Is there another way to create those threads? If not, can you provide more instructions for people who have compiled Spidermonkey but nothing else?