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

Side by Side Diff: third_party/WebKit/Source/platform/heap/BlinkGCInterruptor.h

Issue 2701623003: Remove BlinkGCInterruptor (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BlinkGCInterruptor_h
6 #define BlinkGCInterruptor_h
7
8 #include "platform/PlatformExport.h"
9 #include "wtf/Allocator.h"
10
11 namespace blink {
12
13 // If attached thread enters long running loop that can call back
14 // into Blink and leaving and reentering safepoint at every
15 // transition between this loop and Blink is deemed too expensive
16 // then instead of marking this loop as a GC safepoint thread
17 // can provide an interruptor object which would allow GC
18 // to temporarily interrupt and pause this long running loop at
19 // an arbitrary moment creating a safepoint for a GC.
20 class PLATFORM_EXPORT BlinkGCInterruptor {
21 USING_FAST_MALLOC(BlinkGCInterruptor);
22
23 public:
24 virtual ~BlinkGCInterruptor() {}
25
26 // Request the interruptor to interrupt the thread and
27 // call onInterrupted on that thread once interruption
28 // succeeds.
29 virtual void requestInterrupt() = 0;
30
31 protected:
32 // This method is called on the interrupted thread to
33 // create a safepoint for a GC.
34 void onInterrupted();
35 };
36
37 } // namespace blink
38
39 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BUILD.gn ('k') | third_party/WebKit/Source/platform/heap/BlinkGCInterruptor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698