Hacker News new | ask | show | jobs
by PabloSichert 3518 days ago
Thanks for making that example!

Assuming I am looking at your sketch with the x-axis being time, I just want to note that specific to this library there won't be two events (request start, end or log) at the same time. (The "concurrency" here comes from coroutines, not parallel threads)

1 comments

My mistake. I only see a few outcomes then. #1 happens then #2

  #1 |------|
  #2             |--------|
and #2 happens before #1

  #1                  |-------|
  #2   |---------|
or #1 starts then #2 starts:

  #1   |-------------|
  #2           |------------|
or #1 starts before #2 and finishes before #2

  #1  |---------------------|
  #2       |----------|
For two channels are are 8 possibilities in all. https://oeis.org/A079144