Commit Graph

6 Commits

Author SHA1 Message Date
iposva@google.com c594af7a5a - Use "#if defined" when checking for DEBUG.
Review URL: http://codereview.chromium.org//8879038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2287 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:08:15 +00:00
turnidge@google.com 9ba5441c54 Handle spurious wakeups properly.
Review URL: http://codereview.chromium.org//8392044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@781 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 21:06:18 +00:00
iposva@google.com d04263d0c6 Revert https://code.google.com/p/dart/source/detail?r=597
Review URL: http://codereview.chromium.org//8370016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@622 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 23:22:18 +00:00
jrgfogh@google.com 3b3bef16e2 Fixed a problem with spurious wakeups.
Review URL: http://codereview.chromium.org//8362026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@597 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 12:30:48 +00:00
turnidge@google.com 804becb850 Deleting the wrong message in FlushAll...
Review URL: http://codereview.chromium.org//8347010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@535 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 21:23:06 +00:00
turnidge@google.com 0e98d4ae64 Allow embedders to provide custom message delivery for an isolate.
==============

Added Dart_SetPostMessageCallback and Dart_SetClosePortCallback.
These allow the embedder to provide custom message/port behavior
for their application. The vm provides standard implementations
that work with the standard run loop.

Added Dart_HandleMessage, which processes one message on the
current isolate. Embedders can use this to write their own
message processing loops. Rewrote code to use this internally.

Added Isolate::StandardRunLoop() to share code between
Dart_RunLoop and lib/isolate.cc

Changed the interface to PortMap::PostMessage. PostMessage is
now agnostic to message delivery mechanism. Note that PortMap is
now out of the "ReceiveMessage" business entirely. Moved
MessageQueue and friends out to message_queue.cc/h.

Moved the monitor from the Isolate into the MessageQueue. No
need for outsiders to mess. Added MessageQueue::Wait. Moved
monitor locking from PortMap into MessageQueue itself, which was
easier for me to reason about. Wrote some tests.

Removed PortMessage::Handle. The code turned into Dart_HandleMessage.

Regularized the nomenclature around ports. Type is now always
Dart_Port instead of intptr_t. Variables end in _port instead of
_id. Use the term "dest" instead of "target" or "send".

Added a family of new tests to port_test.

Added EXPECT_NE to the test framework.
Review URL: http://codereview.chromium.org//8297004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@516 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 17:54:07 +00:00