#include <isolate.h>
Definition at line 209 of file isolate.h.
◆ IdleTimeHandler()
dart::IdleTimeHandler::IdleTimeHandler |
( |
| ) |
|
|
inline |
◆ InitializeWithHeap()
void dart::IdleTimeHandler::InitializeWithHeap |
( |
Heap * |
heap | ) |
|
Definition at line 190 of file isolate.cc.
190 {
191 MutexLocker ml(&mutex_);
192 ASSERT(heap_ ==
nullptr && heap !=
nullptr);
193 heap_ = heap;
194}
◆ NotifyIdle()
void dart::IdleTimeHandler::NotifyIdle |
( |
int64_t |
deadline | ) |
|
Definition at line 225 of file isolate.cc.
225 {
226 {
227 MutexLocker ml(&mutex_);
228 disabled_counter_++;
229 }
230 if (heap_ != nullptr) {
232 }
233 {
234 MutexLocker ml(&mutex_);
235 disabled_counter_--;
236 idle_start_time_ = 0;
237 }
238}
void NotifyIdle(int64_t deadline)
◆ NotifyIdleUsingDefaultDeadline()
void dart::IdleTimeHandler::NotifyIdleUsingDefaultDeadline |
( |
| ) |
|
Definition at line 240 of file isolate.cc.
240 {
243}
void NotifyIdle(int64_t deadline)
static int64_t GetCurrentMonotonicMicros()
◆ ShouldCheckForIdle()
bool dart::IdleTimeHandler::ShouldCheckForIdle |
( |
| ) |
|
Definition at line 196 of file isolate.cc.
196 {
197 MutexLocker ml(&mutex_);
198 return idle_start_time_ > 0 && FLAG_idle_timeout_micros != 0 &&
199 disabled_counter_ == 0;
200}
◆ ShouldNotifyIdle()
bool dart::IdleTimeHandler::ShouldNotifyIdle |
( |
int64_t * |
expiry | ) |
|
Definition at line 209 of file isolate.cc.
209 {
211
212 MutexLocker ml(&mutex_);
213 if (idle_start_time_ > 0 && disabled_counter_ == 0) {
214 const int64_t expiry_time = idle_start_time_ + FLAG_idle_timeout_micros;
215 if (expiry_time < now) {
216 idle_start_time_ = 0;
217 return true;
218 }
219 }
220
221 *expiry = now + FLAG_idle_timeout_micros;
222 return false;
223}
◆ UpdateStartIdleTime()
void dart::IdleTimeHandler::UpdateStartIdleTime |
( |
| ) |
|
Definition at line 202 of file isolate.cc.
202 {
203 MutexLocker ml(&mutex_);
204 if (disabled_counter_ == 0) {
206 }
207}
◆ DisableIdleTimerScope
The documentation for this class was generated from the following files: