Revert "fix a bug which simulator use high CPU usage if app cannot respond"

This change made normal usage of the REPL when trying to select a view
very slow. Needs a better fix after the 2.25 release.

This reverts commit 5b1398c796.

Related to http://hipbyte.myjetbrains.com/youtrack/issue/RM-458.
This commit is contained in:
Eloy Durán
2014-04-07 18:00:43 +02:00
parent f461970e66
commit 145033f4a4

View File

@@ -712,18 +712,6 @@ receive_string(void)
NSMutableString *res = [NSMutableString new];
bool received_something = false;
while (true) {
fd_set read_fds;
FD_ZERO(&read_fds);
FD_SET(repl_fd, &read_fds);
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 50000;
if (select(repl_fd + 1, &read_fds, NULL, NULL, &tv) == -1) {
perror("select()");
break;
}
char buf[1024 + 1];
ssize_t len = recv(repl_fd, buf, sizeof buf, 0);
if (len == -1) {