Re: Threads, Sockets and OSX

Nicola Mingotti <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <[email protected]>


On 12/6/18 1:16 AM, Peter Hickman wrote:
> Using RVM on OSX I've tested this for 2.3.3 and 2.5.1 with no 
> significant change in the behaviour. I did note that under 2.5.1 the 
> freeze ups were shorter and the periods of work were longer but the 
> picket fence CPU usage remains (100% for 15 seconds, 0% for 10 
> seconds, repeat)
>
> I'm wondering, does Ruby implement it's own threading system or call 
> out to the underlying OS services. This could be down to how OSX 
> schedules stuff rather than a Ruby version issue
>
> Perhaps I need to implement this in Python and see if I get the same 
> behaviour
>
>

In JRuby threads are Java threads.
They should behave as you expect out of the box.

Give it a shot if you have time. It is worth it IMO.
It will take you say 10-15 minutes to make a test, you don't need
to change the Ruby code (as far as your code is not dependent on "C gems").

JR is not silver bullet for everything, eg. it takes a while to start
so it is not ideal for shell programs you want to run by hand
and read immediately the result back.

bye
n.


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.