-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
First pass at a protocol is
Line 93 in 6c416d0
| defprotocol Mergeable do |
The goal is to make this more generic (not just specific to merge). Initial thought is:
defprotocol Connectable do
def connect(source, target)
def disconnect(connection)
endI think that connect should return some sort of connection. disconnect will accept that as an input. This will contain the protocol so implementations can do whatever they want.
Potential uses:
Stream.Merge would connect each of the substreams to the target, allowing us to collapse nested merges.
GenEvent.Streams could be merged without an intermediate process.
Stream.Interval could call :timer.send_interval rather than spawn a new process. disconnect would cancel the timer.
and more...
Metadata
Metadata
Assignees
Labels
No labels