src/hotspot/share/memory/iterator.hpp
changeset 50097 ed8a43d83fcc
parent 49827 a4672513d6e3
child 50752 9d62da00bf15
--- a/src/hotspot/share/memory/iterator.hpp	Mon May 14 11:47:03 2018 +0200
+++ b/src/hotspot/share/memory/iterator.hpp	Mon May 14 11:47:03 2018 +0200
@@ -318,8 +318,11 @@
 // by means of checking the return value from the polling
 // call.
 class YieldClosure : public StackObj {
-  public:
-   virtual bool should_return() = 0;
+public:
+ virtual bool should_return() = 0;
+
+ // Yield on a fine-grain level. The check in case of not yielding should be very fast.
+ virtual bool should_return_fine_grain() { return false; }
 };
 
 // Abstract closure for serializing data (read or write).