Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/scheduler/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ impl<VM: VMBinding> GCWorkScheduler<VM> {
move |scheduler: &GCWorkScheduler<VM>| {
let should_open = scheduler.are_buckets_drained(&cur_stages);
// Additional check before the `RefClosure` bucket opens.
if should_open && stage == LAST_CLOSURE_BUCKET {
if should_open && stage == FIRST_REF_CLOSURE_BUCKET {
if let Some(closure_end) =
scheduler.closure_end.lock().unwrap().as_ref()
{
if closure_end() {
// Don't open `LAST_CLOSURE_BUCKET` if `closure_end` added more works to `Closure`.
// Don't open `FIRST_REF_CLOSURE_BUCKET` if `closure_end` added more works to `Closure`.
return false;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/scheduler/work_bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,6 @@ impl WorkBucketStage {
}
}

pub const LAST_CLOSURE_BUCKET: WorkBucketStage = WorkBucketStage::PhantomRefClosure;
/// This constant tracks the first ref closure bucket. We allow bindings to implement their own
/// weak reference processing before this bucket is opened and before MMTk's weak reference processing.
pub const FIRST_REF_CLOSURE_BUCKET: WorkBucketStage = WorkBucketStage::SoftRefClosure;