#2870 new defect

async initialization of Client

Reported by: dawuud Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: 1.12.1
Keywords: Cc:
Launchpad Bug:

Description (last modified by meejah)

Client, among other things, follow a pattern like this:

  • their __init__ has a bunch of non-trivial code, including creating other objects and possibly doing async things
  • if other things need to know "when they're ready" there are tricks like when_ready methods.

Instead this code should be written like this:

  • a create_thing factory-method (that is async) is created
  • all non-trivial objects are instantiated outside and passed it
  • IService and startService should be used solely for startup notification

Change History (1)

comment:1 Changed at 2017-03-06T20:51:02Z by meejah

  • Description modified (diff)
  • Summary changed from tahoe Service/Multiservice objects should use startService to async initialization of Client
Note: See TracTickets for help on using tickets.