API docs: LSIF: use a queue for documentation grouping channels
Created by: slimsag
This switches collectDocumentation
from emitting two channels of information,
which are co-dependent (i.e., if one channel becomes full more results may not
be sent until that channel is emptied) to a queued implementation where both
channels operate independently. If more values are put into the queues than are
being consumed, they get buffered in-memory until they are consumed. Otherwise,
no additional dynamic buffering is done.
This is an important pre-requisite to adding documentation <-> codeintel mapping information.
It also occurs to me that this could have potentially been the cause of the fabled "I sometimes see LSIF uploads cause a deadlock" - I think that still shouldn't happen, but this (channel deadlock) could've been the cause potentially. I haven't explored that extensively.
Signed-off-by: Stephen Gutekanst [email protected]