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

Unified Diff: runtime/vm/os_thread.h

Issue 1537543002: Fix for issue 25236 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/os_thread.h
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index 9371b4538ae3d44227f23d13f58ac3bcd182551e..2dbbb510deda636621ef52c47cc6b278666e7841 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -50,7 +50,6 @@ class BaseThread {
// Low-level operations on OS platform threads.
class OSThread : public BaseThread {
public:
- OSThread();
~OSThread();
ThreadId id() const {
@@ -170,17 +169,26 @@ class OSThread : public BaseThread {
static bool Compare(ThreadId a, ThreadId b);
static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage);
+ static OSThread* CreateOSThread();
zra 2015/12/17 16:37:59 Maybe this should go up at the top of the class wh
siva 2015/12/17 18:19:13 Done.
+
// Called at VM startup and shutdown.
static void InitOnce();
static bool IsThreadInList(ThreadJoinId join_id);
+ static void DisableOSThreadCreation();
+ static void EnableOSThreadCreation();
+
static const intptr_t kStackSizeBuffer = (4 * KB * kWordSize);
static const ThreadId kInvalidThreadId;
static const ThreadJoinId kInvalidThreadJoinId;
private:
+ // The constructor is private as CreateOSThread should be used
+ // to create a new OSThread structure.
+ OSThread();
+
// These methods should not be used in a generic way and hence
// are private, they have been added to solve the problem of
// accessing the VM thread structure from an OSThread object
@@ -220,6 +228,7 @@ class OSThread : public BaseThread {
static OSThread* thread_list_head_;
static Mutex* thread_list_lock_;
+ static bool creation_enabled_;
friend class OSThreadIterator;
friend class ThreadInterrupterWin;
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/os_thread.cc » ('j') | runtime/vm/os_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698