You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions that operate on sd_journal objects are thread agnostic — given sd_journal pointer may only be used from one specific thread at all times (and it has to be the very same one during the entire lifetime of the object), but multiple, independent threads may use multiple, independent objects safely.
The "Thread safety" section of the
sd-journal
manpage says:That section was added to the documentation in systemd v232 (wayback machine).
Code using
sdjournal.Journal
can abide by this constraint by e.g.:On the other hand,
func (*JournalReader) Follow
cannot be used thread-safely as it callsJournal
methods from spawned goroutines.go-systemd/sdjournal/read.go
Lines 232 to 236 in 9ed442a
The text was updated successfully, but these errors were encountered: