mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
add in-line doc that Josh wrote as he was trying to understand this code
This commit is contained in:
parent
44902c5152
commit
80b09b6d54
@ -3,6 +3,12 @@
|
||||
from twisted.internet import defer
|
||||
from foolscap.eventual import eventually
|
||||
|
||||
"""The idiom we use is for the observed object to offer a method named
|
||||
'when_something', which returns a deferred. That deferred will be fired when
|
||||
something happens. The way this is typically implemented is that the observed
|
||||
has an ObserverList whose when_fired method is called in the observed's
|
||||
'when_something'."""
|
||||
|
||||
class OneShotObserverList:
|
||||
"""A one-shot event distributor."""
|
||||
def __init__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user