Commit Graph

12 Commits

Author SHA1 Message Date
Brian Tiger Chow
bb0b5f7c0b fix(notifications) prevent deadlock when context cancelled early
+ test(notifications)

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:31 +00:00
Brian Tiger Chow
fb5779661b fix(bs/notifications) use SubOnceEach to provide uniqueness guarantee
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

vendor forked pubsub to get SubOnceEach

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Brian Tiger Chow
9bf1ba6ab5 fix(bs/notifications) prevent duplicates
@whyrusleeping now notifications _guarantees_ there won't be any
duplicates

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
6a5bc4b879 fix(bs/n) remove unnecessary variable
to remove ambiguity

(before it was possible to loop over either topics or keys

by only keeping keys, there's no confusing about what to use for the
loop range

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
134929ac64 misc(bs/n) rm dead code
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
03324f7765 fix(bitswap/notifications) subscribe to many
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
1fb80330da docs(bitswap/notifications)
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:27 +00:00
Jeromy
d53deebada wire GetBlocks into blockservice 2014-12-05 20:53:26 +00:00
Brian Tiger Chow
8f8230823f feat(bitswap/notifications) Subscribe to multiple keys
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Brian Tiger Chow
85229be43a style(bitswap/notifications) make it more obvious
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:21 +00:00
Brian Tiger Chow
3fdbd6cd15 fix(bitswap/notifications) don't force sender to block on receiver
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:12:35 -08:00
Brian Tiger Chow
fd086b9c48 refac(exchange) bitswap -> exchange/bitswap
Move go-ipfs/bitswap package to go-ipfs/exchange/bitswap

* Delineates the difference between the generic exchange interface and
  implementations (eg. BitSwap protocol)

  Thus, the bitswap protocol can be refined without having to overthink
  how future exchanges will work. Aspects common to BitSwap and other
  exchanges can be extracted out to the exchange package in piecemeal.

  Future exchange implementations can be placed in sibling packages next
  to exchange/bitswap. (eg. exchange/multilateral)
2014-09-22 04:06:13 -07:00