Where can I find information of Ruby’s IO class? And what do you mean by C libraries? was ruby made in C?
“Matthew Shapiro” email@example.com writes:
keyboard input in a non-blocking way. One thing that I have been
thinking was using multithreading (which looks amazingly easy in
ruby) and use the .collect() function, but does this block?
As long as you use the IO functions from the IO class, ruby won’t
Also will it pick up keys like the up arrow?
That depends on what the C library returns you. If your C library
allows you to pick up the up arrow key using getc, then ditto for
Now, if my reading of eval.c and sig is correct, then the thread
granularity of ruby is per AST node, and if a node takes more than 500
ticks (of what?, of system’s timer interrupt?), then it is pre-empted
except if Thread#critical is set.
Am I correct?