Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
neoppod
Commits
d83cb872
Commit
d83cb872
authored
Dec 09, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cache: fix possible endless loop in __repr__/_iterQueue
parent
be839e92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
neo/client/cache.py
neo/client/cache.py
+10
-7
No files found.
neo/client/cache.py
View file @
d83cb872
...
...
@@ -94,13 +94,16 @@ class ClientCache(object):
def
_iterQueue
(
self
,
level
):
"""for debugging purpose"""
if
level
<
len
(
self
.
_queue_list
):
item
=
head
=
self
.
_queue_list
[
level
]
if
item
:
while
1
:
# Lockless iteration of the queue.
# XXX: In case of race condition, the result is wrong but at least,
# it won't loop endlessly. If one want to collect accurate
# statistics, a lock should be used.
expire
=
0
item
=
self
.
_queue_list
[
level
]
while
item
and
item
.
level
==
level
and
expire
<
item
.
expire
:
yield
item
expire
=
item
.
expire
item
=
item
.
next
if
item
is
head
:
break
def
_remove_from_oid_dict
(
self
,
item
):
item_list
=
self
.
_oid_dict
[
item
.
oid
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment