سؤال

Please let me know if there is a way to run multi-threads in parallel. What I know till now is that Ruby has a global interpreter lock or global VM lock which blocks threads to run in parallel and implement concurrently. Please let me know some good detailed thread examples to actually understand and verify that threads are working in parallel or concurrently.

هل كانت مفيدة؟

المحلول

Not with MRI (only concurrency) but Yes with jRuby.

See this great article, there are plenty others on the subject but this one is pretty recent and provides good advice.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top