Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into codedb-ffi-io
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Jun 5, 2016
2 parents 6584257 + f23df63 commit b579c01
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions machine/memory/finalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace rubinius {

for(FinalizerObjects::iterator i = live_list_.begin();
i != live_list_.end();
++i)
/* advance is handled in the loop */)
{
FinalizerObject* fo = *i;

Expand All @@ -282,17 +282,21 @@ namespace rubinius {

if(fo->match_p(state, obj, finalizer)) {
if(finalizer->nil_p()) {
live_list_.erase(i);
i = live_list_.erase(i);
continue;
} else {
synchronization_->list_mutex().lock();
return;
}
}

synchronization_->list_mutex().lock();
++i;
}
}

if(finalizer->nil_p()) return;

/* Rubinius specific API. If the finalizer is the object, we're going to
* send the object __finalize__. We mark that the user wants this by
* putting cTrue as the ruby_finalizer.
Expand Down

0 comments on commit b579c01

Please sign in to comment.