Skip to content
Snippets Groups Projects
Commit 1cbede87 authored by deuce's avatar deuce
Browse files

Use File.raw_pollin() for stdin input.

parent 6395a355
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,9 @@ var k; ...@@ -7,13 +7,9 @@ var k;
while(!js.terminated) { while(!js.terminated) {
if (parent_queue.poll(0)) if (parent_queue.poll(0))
break; break;
if (system.platform == 'Win32') if (stdin.raw_pollin(100))
k = stdin.raw_read(1);
else {
if (socket_select([stdin.descriptor], 0.1).length == 1)
k = stdin.raw_read(1); k = stdin.raw_read(1);
else else
k = undefined; k = undefined;
}
ai.add(k); ai.add(k);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment