I do not have time to dig into this now, but will try to look at it later today.
To write in a different loop you can use something like the Consumer/Producer Design Pattern. It comes with all recent versions of LV.
The process of getting complete segments involves keeping the partial segment from a previous read in a shift register and then appending the remainder after the next read. Similarly the case of multiple enqueues requires multiple dequeues. It is not hard but the details can be messy.
Lynn