Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
28c9985f
Commit
28c9985f
authored
Oct 4, 2012
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Arrange to restart dead delivery threads.
parent
e1d747dc
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
irkerd
+5
-3
5 additions, 3 deletions
irkerd
with
5 additions
and
3 deletions
irkerd
+
5
−
3
View file @
28c9985f
...
...
@@ -117,9 +117,7 @@ class Connection:
self
.
channel_limits
=
{}
# The consumer thread
self
.
queue
=
Queue
.
Queue
()
self
.
thread
=
threading
.
Thread
(
target
=
self
.
dequeue
)
self
.
thread
.
setDaemon
(
True
)
self
.
thread
.
start
()
self
.
thread
=
None
def
nickname
(
self
,
n
=
None
):
"
Return a name for the nth server connection.
"
if
n
is
None
:
...
...
@@ -160,6 +158,10 @@ class Connection:
self
.
status
=
"
ready
"
def
enqueue
(
self
,
channel
,
message
):
"
Enque a message for transmission.
"
if
self
.
thread
is
None
or
not
self
.
thread_is_alive
():
self
.
thread
=
threading
.
Thread
(
target
=
self
.
dequeue
)
self
.
thread
.
setDaemon
(
True
)
self
.
thread
.
start
()
self
.
queue
.
put
((
channel
,
message
))
def
dequeue
(
self
):
"
Try to ship pending messages from the queue.
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment