arm: cleanup dead async code
This commit is contained in:
29
arm/async.cc
29
arm/async.cc
@@ -165,31 +165,4 @@ void resume(AwaitableType type) {
|
||||
delete stuff;
|
||||
}
|
||||
|
||||
} // namespace async
|
||||
|
||||
#if 0
|
||||
|
||||
task<buffer> readline() {
|
||||
int size = 0;
|
||||
char c;
|
||||
|
||||
buffer buff = buffer::make(32);
|
||||
|
||||
// fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK);
|
||||
|
||||
while (true) {
|
||||
int n = read(0, &c, 1);
|
||||
if (n < 1) {
|
||||
co_await co_waitio();
|
||||
continue;
|
||||
}
|
||||
buff.data[size++] = static_cast<std::byte>(c);
|
||||
|
||||
if (c == '\n') {
|
||||
buff.data = buff.data.subspan(0, size);
|
||||
co_return buff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // 0
|
||||
} // namespace async
|
||||
Reference in New Issue
Block a user