-j
On Mon, May 2, 2016 at 5:52 PM Nigel Vickers <rhe...@gmail.com> wrote:
I think that a select statement consisting of a single ubuffered channel operation case / solely of cases of unbuffered channel operations, with no default clause, is basically a race condition.
If the only case / all of the cases is/are not ready to proceed at the time the select statement cases are evaluated, the select will block forever. (Additionally, the deadlock detector seems to miss such situation.)
Not a proof of anything, but: https://play.golang.org/p/vV0GF4gYVL
---j
I took a quick look at the code.One thing seems more a bug than a design choice:If you have a tasklimit of 100000 and 20 primers, the number of tasks executed can go up to 20*100000,because each primer has its own i counter and the thing exits only when one of the i counters reaches tasklimit.(each i counter of each primer can go up to 99999 before exiting).
Combine this with the fact that unbuffered channels make the thing constantly switch goroutines and we may have foundyour performance problem.