Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
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
Joshua
zodb
Commits
d1d8048a
Commit
d1d8048a
authored
Jan 02, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the apply() calls now.
parent
d0ff628e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/ThreadedAsync/LoopCallback.py
src/ThreadedAsync/LoopCallback.py
+3
-3
No files found.
src/ThreadedAsync/LoopCallback.py
View file @
d1d8048a
...
...
@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop
thread calls loop(), each registered callback will be called with the
socket map as its first argument.
"""
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
import
asyncore
import
select
...
...
@@ -62,7 +62,7 @@ def register_loop_callback(callback, args=(), kw=None):
_loop_lock
.
acquire
()
try
:
if
_looping
is
not
None
:
apply
(
callback
,
(
_looping
,)
+
args
,
kw
or
{}
)
callback
(
_looping
,
*
args
,
**
(
kw
or
{})
)
else
:
_loop_callbacks
.
append
((
callback
,
args
,
kw
))
finally
:
...
...
@@ -85,7 +85,7 @@ def _start_loop(map):
_looping
=
map
while
_loop_callbacks
:
cb
,
args
,
kw
=
_loop_callbacks
.
pop
()
apply
(
cb
,
(
map
,)
+
args
,
kw
or
{}
)
cb
(
map
,
*
args
,
**
(
kw
or
{})
)
finally
:
_loop_lock
.
release
()
...
...
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