I'm splitting the calculation of a complex process in different Shells for getting multiprocess performance. It's the first time I'm making something like this, so I'm a little confused about some of the steps.
I'be based on the same example described in Xojo page (WordCounter). In fact, I've use exactly the same code (with the modifications for adapting to my app) for making it running.
Each one of the shells is calculating a list of numbers I'm saving in a string (spaced with CHR(9) for easy conversion into a numeric array later on).
The software is running ok and working in multiprocess if the strings are small, but when the strings become large, they are not read 100%.
For example if the result of the Shell is a string of 11218 Bytes, the Main App get's only the first 8192 Bytes. If the result of the shell is a string of 248 Bytes, the Main App get's it perfectly.
I'm running the Shells in Asynchronous mode and getting the result using the DataAvailable event of the Shell.
It's possible to specify the amount of memory for each Shell?, maybe the problem comes from here.
How could I ensure the Shell has finish writing all the data in the result?. I mean, is the "DataAvailable" event been launch when the data starts been available or when it's finished and no more data is saved?, because the problem also comes from here.
Any idea of why is working with small amount of data but not with large amount of data?.
Witch part of my code would you like to take a look for knowing what I'm making wrong?.
Thanks in advance.