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
When I looked into it, Ruby 1.9 was too reliant on threads (which are not supported in the browser). We'd need to cut all the threading out manually for it to be viable. There are no immediate plans to support Ruby 1.9, but we'll be happy to include it if someone contributes an implementation.
Now that web workers are more available in browser implementations, could you possibly do "threads" via web workers, or do web worker limitations prevent that being feasible?
Web workers do not support sleep()/await() or synchronous messages, so they can't be used to simulate arbitrary threads. However, it's technically possible to emulate them on a single thread with some effort. It's been a while since I looked at Emscripten, but it's possible that it supports that emulation by now.
Activity
max99x commentedon Dec 17, 2011
Comment copied from original issue on repl.it:
When I looked into it, Ruby 1.9 was too reliant on threads (which are not supported in the browser). We'd need to cut all the threading out manually for it to be viable. There are no immediate plans to support Ruby 1.9, but we'll be happy to include it if someone contributes an implementation.
malachaifrazier commentedon Oct 3, 2012
Has some implementation of Node.js been taken into consideration?
nihonjinrxs commentedon Jul 28, 2013
Now that web workers are more available in browser implementations, could you possibly do "threads" via web workers, or do web worker limitations prevent that being feasible?
max99x commentedon Jul 28, 2013
Web workers do not support sleep()/await() or synchronous messages, so they can't be used to simulate arbitrary threads. However, it's technically possible to emulate them on a single thread with some effort. It's been a while since I looked at Emscripten, but it's possible that it supports that emulation by now.