dart-sdk/runtime/include
turnidge@google.com c658fa60f9 Fix deadlock that can occur while handling service messages at a breakpoint.
Deadlock looks like:

  Regular Isolate
  -> paused at breakpoint in debug message loop
  -> holds debug message queue lock to get message notifications
  -> handles an service message
  -> waits for portmap lock to send response

  Service Isolate
  -> receives request for paused isolate
  -> holds portmap lock to send message
  -> runs custom message notifier to wake debug message loop
  -> waits for debug message queue lock

I've solved this by releasing the debug message queue lock while
handling service messages.  This requires me to poll for new service
messages after reacquiring the debug message queue lock to make sure I
haven't dropped any notifications.

It's a little weird that the embedder (runtime/bin) needs to be aware
of the locking in the core vm (runtime/vm), but this seemed like the
simplest fix for now.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//629533002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41326 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 16:57:21 +00:00
..
dart_api.h Fix deadlock that can occur while handling service messages at a breakpoint. 2014-10-27 16:57:21 +00:00
dart_debugger_api.h
dart_mirrors_api.h
dart_native_api.h