Opened 9 years ago

Closed 9 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 Antoine Martin)

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 9 years ago by Antoine Martin

Description: modified (diff)
Milestone: 1.00.9.1
Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted
Summary: Make better use of twisted and its deferred: ProcessProtocol, sockets...start processes using twisted: use ProcessProtocol

comment:2 Changed 9 years ago by Antoine Martin

Description: modified (diff)
Summary: start processes using twisted: use ProcessProtocolthreading / start processes using twisted: use ProcessProtocol

comment:3 Changed 9 years ago by Antoine Martin

Description: modified (diff)

comment:4 Changed 9 years ago by Antoine Martin

Description: modified (diff)

comment:5 Changed 9 years ago by Antoine Martin

Description: modified (diff)

4 was done by r1823: removing the unused code
1 and 2 done in r1830

just leaves 3...

Last edited 8 years ago by Antoine Martin (previous) (diff)

comment:6 Changed 9 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

done 3 in r1831

Last edited 8 years ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.