Changes between Initial Version and Version 1 of Ticket #2870


Ignore:
Timestamp:
2017-03-06T20:51:02Z (7 years ago)
Author:
meejah
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2870

    • Property Summary changed from tahoe Service/Multiservice objects should use startService to async initialization of Client
  • Ticket #2870 – Description

    initial v1  
     1Client, among other things, follow a pattern like this:
    12
    2 the tahoe source code has many services which perform their async initialization in their class constructor whereas they should probably be using startService for that.
     3- their `__init__` has a bunch of non-trivial code, including creating other objects and possibly doing async things
     4- if other things need to know "when they're ready" there are tricks like `when_ready` methods.
     5
     6Instead this code should be written like this:
     7
     8- a `create_thing` factory-method (that is async) is created
     9- all non-trivial objects are instantiated outside and passed it
     10- IService and `startService` should be used solely for startup notification