Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: runtime/bin/eventhandler_fuchsia.cc

Issue 2545833003: Fuchsia: Throttle epoll to prevent message queues from being overwhelmed with level-triggered event… (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/secure_socket_boringssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_fuchsia.cc
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index c298e220e3875aff5f4da21852b401219ce78fde..39be1ffb423f340c45c3759604dd5d135e61d42a 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -449,6 +449,10 @@ void EventHandlerImplementation::Poll(uword args) {
while (!handler_impl->shutdown_) {
int64_t millis = handler_impl->GetTimeout();
ASSERT((millis == kInfinityTimeout) || (millis >= 0));
+ // TODO(US-109): When the epoll implementation is properly edge-triggered,
+ // remove this sleep, which prevents the message queue from being
+ // overwhelmed and leading to memory exhaustion.
+ usleep(5000);
LOG_INFO("epoll_wait(millis = %ld)\n", millis);
intptr_t result = NO_RETRY_EXPECTED(
epoll_wait(handler_impl->epoll_fd_, events, kMaxEvents, millis));
« no previous file with comments | « no previous file | runtime/bin/secure_socket_boringssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698