X Tutup
Skip to content

poll and fileno() #48

@hholst80

Description

@hholst80

I have a loop which seems to work for some time but then after a number of messages it starts to fall through even there is no data available on the Reader.

Basically,

j = journal.Reader()
j.this_boot()
poller = select.poll()
poller.register(j.fileno())
while True:
    poller.poll()  # returns within 1E-6 seconds
    print(j.get_next())  # prints out {}

Is this some fundamental use error on my side? The poller object should only return when the journal endpoint has some data to be read?

I have systemd-python version:

In [6]: systemd.journal.__version__
Out[6]: '234'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup