...thanks but processing and writing after that is too slow. i need to do 2 jobs in the same time...

...working paralel...

please help me
Please explain why you insist this must be a parallel operation (you say so here and in your other posts). What is your "processing" that makes it so slow? And writing a small amount of data to a log file should be very fast, unless you are opening and closing the file for every write.

Based on what you are asking and how you are asking it, I am not sure you understand enough to write a multi-threaded application that will work correctly.