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:
parent
c8af2f2c1e
commit
b237b4dc2a
|
@ -7,7 +7,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"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
|
// 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) {
|
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)
|
filterMap, err := generateEventFilters(options.Filters, options.Since, options.Until)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to parse event filters: %w", err)
|
return fmt.Errorf("failed to parse event filters: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue