Skip to content

Commit

Permalink
libpod: journald do not lock thread
Browse files Browse the repository at this point in the history
This is not needed and was added by during debugging but it turned out
to be something else. We should not lock the thread unless needed
because this just raises question why it is here otherwise.
Also the lock would not do much as we spawn a goroutine below anyway so
it runs on another thread no matter what.

From the review comment by Miloslav but it was merged before I had the
chance to fix it:
containers#24406 (comment)

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 5, 2024
1 parent c8af2f2 commit b237b4d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libpod/events/journal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"errors"
"fmt"
"runtime"
"strconv"
"time"

Expand Down Expand Up @@ -99,8 +98,6 @@ func (e EventJournalD) Write(ee Event) error {

// Read reads events from the journal and sends qualified events to the event channel
func (e EventJournalD) Read(ctx context.Context, options ReadOptions) (retErr error) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
filterMap, err := generateEventFilters(options.Filters, options.Since, options.Until)
if err != nil {
return fmt.Errorf("failed to parse event filters: %w", err)
Expand Down

0 comments on commit b237b4d

Please sign in to comment.