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

Unified Diff: runtime/vm/isolate.h

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 4 months 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 9f54497d4c41840db46b6d79ec892ab0d7da599e..73dabf4b506baebbe3573f7f359a91bf469ba576 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -752,6 +752,12 @@ class Isolate : public BaseIsolate {
mutator_thread_->set_zone(zone);
}
+ void Kill();
+ static void KillAllIsolates();
+
+ static void DisableIsolateCreation();
+ static void EnableIsolateCreation();
+
private:
friend class Dart; // Init, InitOnce, Shutdown.
@@ -761,6 +767,7 @@ class Isolate : public BaseIsolate {
static Isolate* Init(const char* name_prefix,
const Dart_IsolateFlags& api_flags,
bool is_vm_isolate = false);
+ void LowLevelShutdown();
void Shutdown();
void BuildName(const char* name_prefix);
@@ -926,12 +933,14 @@ class Isolate : public BaseIsolate {
static void WakePauseEventHandler(Dart_Isolate isolate);
// Manage list of existing isolates.
- static void AddIsolateTolist(Isolate* isolate);
+ static bool AddIsolateToList(Isolate* isolate);
static void RemoveIsolateFromList(Isolate* isolate);
static void CheckForDuplicateThreadState(InterruptableThreadState* state);
- static Monitor* isolates_list_monitor_; // Protects isolates_list_head_
+ // This monitor protects isolates_list_head_, and creation_enabled_.
+ static Monitor* isolates_list_monitor_;
static Isolate* isolates_list_head_;
+ static bool creation_enabled_;
#define REUSABLE_FRIEND_DECLARATION(name) \
friend class Reusable##name##HandleScope;

Powered by Google App Engine
This is Rietveld 408576698