~saviq/unity-scopes-api/fix-cross-wrap

Viewing all changes in revision 554.

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2014-12-08 07:13:57 UTC
  • mfrom: (552.1.6 wasted-threads)
  • Revision ID: tarmac-20141208071357-wdfjwnedne22c9pe
Changed run_scope() to not create a separate run time up-front just so it can
push the state notification when registry when the scope finishes. This has
two advantages:

- We don't create an extra eleven threads that hang around and do nothing for the
  entire life time of the scope.

- We don't create two run times with the same name (as was happening previously).
  The run time IDs must be unique because they are used to derive other things
  that must be unique, such as socket names and log file names. In particular,
  the duplicate run time IDs caused the log file to get corrupted.

This solution is better than what we had, but still sub-optimal because we are still creating a separate run time at the end just so we can tell the registry that the scope has stopped. It would be better to bury these notifications in the middleware, where we can take short-cuts without all the overhead of outgoing thread pools and the like.

Also deprecated the run_scope() overload that takes a Runtime.ini param. That one was not needed, and not called by anyone (including the Go implementation).

We need to remember to strip this method from Runtime next time we do an ABI incompatible release.

Stripped out a bunch of redundant "mutable" in RuntimeImpl.h.

Approved by Marcus Tomlinson, PS Jenkins bot.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: