good morning!!!!

Skip to content
Snippets Groups Projects
  1. Aug 05, 2016
    • Felix Lange's avatar
      rpc: ensure client doesn't block for slow subscribers · f5f042ff
      Felix Lange authored
      I initially made the client block if the 100-element buffer was
      exceeded. It turns out that this is inconvenient for simple uses of the
      client which subscribe and perform calls on the same goroutine, e.g.
      
          client, _ := rpc.Dial(...)
          ch := make(chan int) // note: no buffer
          sub, _ := client.EthSubscribe(ch, "something")
          for event := range ch {
              client.Call(...)
          }
      
      This innocent looking code will lock up if the server suddenly decides
      to send 2000 notifications. In this case, the client's main loop won't
      accept the call because it is trying to deliver a notification to ch.
      
      The issue is kind of hard to explain in the docs and few people will
      actually read them. Buffering is the simple option and works with close
      to no overhead for subscribers that always listen.
      f5f042ff
    • Felix Lange's avatar
  2. Jul 25, 2016
  3. Jul 22, 2016
  4. Jul 20, 2016
  5. Jul 19, 2016
  6. Jul 16, 2016
  7. Jul 15, 2016
  8. Jul 14, 2016
Loading