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
95f8ccb6
Commit
95f8ccb6
authored
Sep 10, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove space between function/class name and following left
parenthesis.
parent
03867188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
src/ZEO/zrpc/trigger.py
src/ZEO/zrpc/trigger.py
+16
-16
No files found.
src/ZEO/zrpc/trigger.py
View file @
95f8ccb6
...
...
@@ -20,7 +20,7 @@ import thread
if
os
.
name
==
'posix'
:
class
trigger
(
asyncore
.
file_dispatcher
):
class
trigger
(
asyncore
.
file_dispatcher
):
"Wake up a call to select() running in the main thread"
...
...
@@ -52,10 +52,10 @@ if os.name == 'posix':
# new data onto a channel's outgoing data queue at the same time that
# the main thread is trying to remove some]
def
__init__
(
self
):
def
__init__
(
self
):
r
,
w
=
self
.
_fds
=
os
.
pipe
()
self
.
trigger
=
w
asyncore
.
file_dispatcher
.
__init__
(
self
,
r
)
asyncore
.
file_dispatcher
.
__init__
(
self
,
r
)
self
.
lock
=
thread
.
allocate_lock
()
self
.
thunks
=
[]
self
.
_closed
=
None
...
...
@@ -73,29 +73,29 @@ if os.name == 'posix':
for
fd
in
self
.
_fds
:
os
.
close
(
fd
)
def
__repr__
(
self
):
def
__repr__
(
self
):
return
'<select-trigger (pipe) at %x>'
%
id
(
self
)
def
readable
(
self
):
def
readable
(
self
):
return
1
def
writable
(
self
):
def
writable
(
self
):
return
0
def
handle_connect
(
self
):
def
handle_connect
(
self
):
pass
def
pull_trigger
(
self
,
thunk
=
None
):
def
pull_trigger
(
self
,
thunk
=
None
):
if
thunk
:
try
:
self
.
lock
.
acquire
()
self
.
thunks
.
append
(
thunk
)
self
.
thunks
.
append
(
thunk
)
finally
:
self
.
lock
.
release
()
os
.
write
(
self
.
trigger
,
'x'
)
os
.
write
(
self
.
trigger
,
'x'
)
def
handle_read
(
self
):
self
.
recv
(
8192
)
def
handle_read
(
self
):
self
.
recv
(
8192
)
try
:
self
.
lock
.
acquire
()
for
thunk
in
self
.
thunks
:
...
...
@@ -116,13 +116,13 @@ else:
# win32-safe version
class
trigger
(
asyncore
.
dispatcher
):
class
trigger
(
asyncore
.
dispatcher
):
address
=
(
'127.9.9.9'
,
19999
)
def
__init__
(
self
):
a
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
w
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
def
__init__
(
self
):
a
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
w
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
# set TCP_NODELAY to true to avoid buffering
w
.
setsockopt
(
socket
.
IPPROTO_TCP
,
1
,
1
)
...
...
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