Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
2e154200
Commit
2e154200
authored
May 22, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give names to all the threads
parent
9442becb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
0 deletions
+7
-0
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+1
-0
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+5
-0
src/ZEO/zrpc/connection.py
src/ZEO/zrpc/connection.py
+1
-0
No files found.
src/ZEO/ClientStorage.py
View file @
2e154200
...
@@ -492,6 +492,7 @@ class ClientStorage(object):
...
@@ -492,6 +492,7 @@ class ClientStorage(object):
check_blob_size_thread
=
threading
.
Thread
(
check_blob_size_thread
=
threading
.
Thread
(
target
=
_check_blob_cache_size
,
target
=
_check_blob_cache_size
,
args
=
(
self
.
blob_dir
,
target
),
args
=
(
self
.
blob_dir
,
target
),
name
=
"%s zeo client check blob size thread"
%
self
.
__name__
,
)
)
check_blob_size_thread
.
setDaemon
(
True
)
check_blob_size_thread
.
setDaemon
(
True
)
check_blob_size_thread
.
start
()
check_blob_size_thread
.
start
()
...
...
src/ZEO/StorageServer.py
View file @
2e154200
...
@@ -333,6 +333,7 @@ class ZEOStorage:
...
@@ -333,6 +333,7 @@ class ZEOStorage:
# If the client isn't waiting for a reply, start a thread
# If the client isn't waiting for a reply, start a thread
# and forget about it.
# and forget about it.
t
=
threading
.
Thread
(
target
=
self
.
_pack_impl
,
args
=
(
time
,))
t
=
threading
.
Thread
(
target
=
self
.
_pack_impl
,
args
=
(
time
,))
t
.
setName
(
"zeo storage packing thread"
)
t
.
start
()
t
.
start
()
return
None
return
None
...
@@ -915,6 +916,7 @@ class StorageServer:
...
@@ -915,6 +916,7 @@ class StorageServer:
timeout
=
StubTimeoutThread
()
timeout
=
StubTimeoutThread
()
else
:
else
:
timeout
=
TimeoutThread
(
transaction_timeout
)
timeout
=
TimeoutThread
(
transaction_timeout
)
timeout
.
setName
(
"TimeoutThread for %s"
%
name
)
timeout
.
start
()
timeout
.
start
()
self
.
timeouts
[
name
]
=
timeout
self
.
timeouts
[
name
]
=
timeout
if
monitor_address
:
if
monitor_address
:
...
@@ -1159,6 +1161,7 @@ class StorageServer:
...
@@ -1159,6 +1161,7 @@ class StorageServer:
__thread
=
None
__thread
=
None
def
start_thread
(
self
,
daemon
=
True
):
def
start_thread
(
self
,
daemon
=
True
):
self
.
__thread
=
thread
=
threading
.
Thread
(
target
=
self
.
loop
)
self
.
__thread
=
thread
=
threading
.
Thread
(
target
=
self
.
loop
)
thread
.
setName
(
"StorageServer(%s)"
%
_addr_label
(
self
.
addr
))
thread
.
setDaemon
(
daemon
)
thread
.
setDaemon
(
daemon
)
thread
.
start
()
thread
.
start
()
...
@@ -1335,6 +1338,7 @@ class TimeoutThread(threading.Thread):
...
@@ -1335,6 +1338,7 @@ class TimeoutThread(threading.Thread):
def
__init__
(
self
,
timeout
):
def
__init__
(
self
,
timeout
):
threading
.
Thread
.
__init__
(
self
)
threading
.
Thread
.
__init__
(
self
)
self
.
setName
(
"TimeoutThread"
)
self
.
setDaemon
(
1
)
self
.
setDaemon
(
1
)
self
.
_timeout
=
timeout
self
.
_timeout
=
timeout
self
.
_client
=
None
self
.
_client
=
None
...
@@ -1405,6 +1409,7 @@ class SlowMethodThread(threading.Thread):
...
@@ -1405,6 +1409,7 @@ class SlowMethodThread(threading.Thread):
def
__init__
(
self
,
method
,
args
):
def
__init__
(
self
,
method
,
args
):
threading
.
Thread
.
__init__
(
self
)
threading
.
Thread
.
__init__
(
self
)
self
.
setName
(
"SlowMethodThread for %s"
%
method
.
__name__
)
self
.
_method
=
method
self
.
_method
=
method
self
.
_args
=
args
self
.
_args
=
args
self
.
delay
=
MTDelay
()
self
.
delay
=
MTDelay
()
...
...
src/ZEO/zrpc/connection.py
View file @
2e154200
...
@@ -612,6 +612,7 @@ class ManagedServerConnection(Connection):
...
@@ -612,6 +612,7 @@ class ManagedServerConnection(Connection):
self
.
call_from_thread
=
self
.
trigger
.
pull_trigger
self
.
call_from_thread
=
self
.
trigger
.
pull_trigger
t
=
threading
.
Thread
(
target
=
server_loop
,
args
=
(
map
,))
t
=
threading
.
Thread
(
target
=
server_loop
,
args
=
(
map
,))
t
.
setName
(
"ManagedServerConnection thread"
)
t
.
setDaemon
(
True
)
t
.
setDaemon
(
True
)
t
.
start
()
t
.
start
()
...
...
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