Opened 15 years ago
Closed 15 years ago
#83 closed enhancement (fixed)
threading / start processes using twisted: use ProcessProtocol
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 0.9.1 |
Component: | Global | Keywords: | |
Cc: |
Description (last modified by )
When starting a process and watching its output, we shouldn't do this in a separate thread but instead integrate the code with twisted main-loop (gtk/glib's actually) using ProcessProtocol?, see here
Also, when waiting for a process by pid (one we may not have launched ourselves), we should use gobject.child_watch_add(pid) which will also integrate with the main loop.
Places of interest:
- 1
ssh_key_util.generate_new_key
: simple call_when_done callback - 2
config_server.do_tunnel_connect_test
: simple call_when_done callback (needs output and returncode) - 3
ssh_command_monitor
: needs every line to be parsed as they are received... - 4
server_link.do_connect_to_server
: re-implements wait_for_socket!!!
Change History (6)
comment:1 Changed 15 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.0 → 0.9.1 |
Owner: | changed from Antoine Martin to Antoine Martin |
Status: | new → accepted |
Summary: | Make better use of twisted and its deferred: ProcessProtocol, sockets... → start processes using twisted: use ProcessProtocol |
comment:2 Changed 15 years ago by
Description: | modified (diff) |
---|---|
Summary: | start processes using twisted: use ProcessProtocol → threading / start processes using twisted: use ProcessProtocol |
comment:3 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 15 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 15 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.
4 was done by r1823: removing the unused code
1 and 2 done in r1830
just leaves 3...