libpod: journald do not lock thread

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:
https://github.com/containers/podman/pull/24406#discussion_r1828102666

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2024-11-05 11:28:42 +01:00
parent c8af2f2c1e
commit b237b4dc2a
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 0 additions and 3 deletions

View File

@ -7,7 +7,6 @@ import (
"encoding/json"
"errors"
"fmt"
"runtime"
"strconv"
"time"
@ -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)