File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/hotspot/share/logging Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -318,13 +318,13 @@ void AsyncLogWriter::initialize() {
318318
319319 AsyncLogWriter* self = new AsyncLogWriter ();
320320 if (self->_initialized ) {
321- Atomic::release_store_fence (&AsyncLogWriter::_instance, self);
322- // All readers of _instance after the fence see non-null.
323321 // We use LogOutputList's RCU counters to ensure all synchronous logsites have completed.
324- // After that, we start AsyncLog Thread and it exclusively takes over all logging I/O.
322+ // After that, we publish the initalized _instance to readers.
323+ // Then we start the AsyncLog Thread and it exclusively takes over all logging I/O.
325324 for (LogTagSet* ts = LogTagSet::first (); ts != nullptr ; ts = ts->next ()) {
326325 ts->wait_until_no_readers ();
327326 }
327+ Atomic::release_store_fence (&AsyncLogWriter::_instance, self);
328328 os::start_thread (self);
329329 log_debug (logging, thread)(" Async logging thread started." );
330330 } else {
You can’t perform that action at this time.
0 commit comments