Closed zarate closed 10 years ago
@zarate Sorry for the slow reply, I didn't get an alert on this. Putting a sleep call there makes some sense-- that's how I handle it in the OSX version. Will try it out in the next few days...
@arirusso haha, ok! let me know how it goes.
Hi there,
First of all, I'm not sure this is a bug or simply if it works as designed. Thought of raising it just in case. My configuration is MPB, Ubuntu 12.04, Ruby 1.9.3p327.
Consider the code below:
This gets at least one of the cores consistently at 100% usage. I would have thought this might not be a big deal, but it really drags the second thread. I've tried setting a higher thread priority to no avail.
You can "workaround" by simply adding a sleep call to input.gets:
Now, I don't know much about handling MIDI, but looks like you would be losing data. Is this acceptable in applications where speed and precision is a must?
Cheers!
Juan
PS: it seems that this does not happen on Ruby 1.8.7, could it be a Ruby regression?