Chromium Code Reviews| Index: runtime/bin/eventhandler_macos.cc |
| diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc |
| index 419c93e4518cb899a4ce7b1c62a9b17b2f29112d..20c6b61383fc5e586ad348c72bfe093885a3c6de 100644 |
| --- a/runtime/bin/eventhandler_macos.cc |
| +++ b/runtime/bin/eventhandler_macos.cc |
| @@ -184,6 +184,9 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id, |
| msg.id = id; |
| msg.dart_port = dart_port; |
| msg.data = data; |
| + // WriteToBlocking will write up to 512 bytes atomically, and since our msg |
| + // is smaller than 512, we don't need a thread lock. |
| + // See: http://linux.die.net/man/7/pipe, section 'Pipe_buf'. |
|
Ivan Posva
2013/08/23 00:14:16
It is a bit questionable quoting a Linux man page
Anders Johnsen
2013/08/23 05:15:27
You are right. I was not able to find it in a mac
|
| intptr_t result = |
| FDUtils::WriteToBlocking(interrupt_fds_[1], &msg, kInterruptMessageSize); |
| if (result != kInterruptMessageSize) { |