hi
Are lines in ngless scripts executed sequentially or are some line executed in parallel to optimize things ?
I'm asking because I have implemented a function in an external module that depends on some of the lines before to finish. The function check if the output file from a previously collect call exist and does nothing if it doesn't. In that way it was my hope that the function would be doing its job when the last sample was processed. It works fine if I have less than 10 samples or are using subsample, but nothing is done (nothing is written to the output file) if I have more than 10 large samples. I was therefore speculating if the lines were ran in parallel and the output from the collect not finished when the next line was called. I have a flock around the part of the function that writes to the output file so only one process at a time should be writing to the output.
Is there a better way to mimic the functionality of collect in functions from external modules ?
Best,
Mette