Definition at line 779 of file heap_test.cc.
◆ ConcurrentForceGrowthScopeTask()
dart::ConcurrentForceGrowthScopeTask::ConcurrentForceGrowthScopeTask |
( |
IsolateGroup * |
isolate_group, |
|
|
Monitor * |
monitor, |
|
|
intptr_t * |
done_count |
|
) |
| |
|
inline |
Definition at line 781 of file heap_test.cc.
784 : isolate_group_(isolate_group),
785 monitor_(monitor),
786 done_count_(done_count) {}
◆ Run()
virtual void dart::ConcurrentForceGrowthScopeTask::Run |
( |
| ) |
|
|
inlinevirtual |
Implements dart::ThreadPool::Task.
Definition at line 788 of file heap_test.cc.
788 {
789 const bool kBypassSafepoint = false;
791 kBypassSafepoint);
792 {
794 StackZone stack_zone(thread);
795
796 GrowableObjectArray& accumulate =
799 for (intptr_t
i = 0;
i < 1000;
i++) {
800
801
802 {
803 ForceGrowthScope force_growth(thread);
804 GrowableObjectArrayPtr unsafe_accumulate = accumulate.ptr();
806 accumulate = unsafe_accumulate;
807 }
808 accumulate.Add(element);
809 }
810 }
812
813 {
814 MonitorLocker ml(monitor_);
815 *done_count_ += 1;
816 ml.Notify();
817 }
818 }
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
static Thread * Current()
static void ExitIsolateGroupAsHelper(bool bypass_safepoint)
static bool EnterIsolateGroupAsHelper(IsolateGroup *isolate_group, TaskKind kind, bool bypass_safepoint)
The documentation for this class was generated from the following file: