mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
Data: also yield while loading unparseable files
Otherwise, the UI would be blocked while loading something big that is not a log file at all.
This commit is contained in:
parent
fb032c177f
commit
6061f34506
1 changed files with 5 additions and 4 deletions
|
@ -314,6 +314,11 @@ class LineCache (Producer):
|
|||
sort_helper = SortHelper (self.__fileobj, offsets)
|
||||
find_insert_position = sort_helper.find_insert_position
|
||||
while True:
|
||||
i += 1
|
||||
if i >= limit:
|
||||
i = 0
|
||||
yield True
|
||||
|
||||
offset = tell ()
|
||||
line = readline ()
|
||||
if not line:
|
||||
|
@ -336,10 +341,6 @@ class LineCache (Producer):
|
|||
pos = find_insert_position (line)
|
||||
levels.insert (pos, dict_levels_get (match.group (1), debug_level_none))
|
||||
offsets.insert (pos, offset)
|
||||
i += 1
|
||||
if i >= limit:
|
||||
i = 0
|
||||
yield True
|
||||
|
||||
self.have_load_finished ()
|
||||
yield False
|
||||
|
|
Loading…
Reference in a new issue