I have a design issue and do not know how to go about it. Basically I have an application that spawns off a seperate thread for each task. In this thread, the task displays a string output. Now, at a time I can have about 100 tasks running simultaneously. I need a way of somehow integrating the string outputs from these threads and placing them into one repository. My idea is to use Files. Does anyone have better ideas on doing this?
thank you
Serialize the writes by pushing a unique item, (eg. malloc the string, load it, push and immediately malloc a new one for the next load), onto a producer-consumer queue. One thread pops the items, writes them to the repository and then disposes/frees/deallocates/whatever the strings.
Rgds,
Martin