Skip to content

Commit

Permalink
Initialize finalizer thread before enabling collection (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Mar 11, 2021
1 parent b7e52c9 commit ef24f49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openjdk/mmtkHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ void MMTkHeap::post_initialize() {
}

void MMTkHeap::enable_collection() {
::enable_collection(0);
// Initialize finalizer thread before enable_collection().
// Otherwise it is possible that we schedule finalizer (during a GC) before the finalizer thread is ready.
MMTkFinalizerThread::initialize();

::enable_collection(0);
}

////Previously pure abstract methods--
Expand Down

0 comments on commit ef24f49

Please sign in to comment.