Any way of doing this? I have this multithreaded java app I'm scraping, and it doesn't behave well when number of threads are more than one.
Cheers!
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Mar 15, 2010, 2:16 AM
Can you get the other applications to do what you need them to do without executing them from C#? If so, then we need to figure out how to do the same thing, except from C#.
Lars KPosted Mar 15, 2010, 12:26 AM
Anyway - what I'm trying to do is create a shell to automate some of the manual tasks creating some output files I need. In order to do that, I first need to run the java application to generate the base files and get some info out of the text printed to the screen. I then need to run a windows forms application to modify these, and lastly I need to run through the files doing some search and replace. I have no control over the source files of the first two apps.
Where I'm at: My test application is seemingly working just fine, except the java application is a little bit dodgy and...just hangs. I have no idea why, and there's no useful information in the logs it provides. When I turn the number of threads down to 1 in the config, it's seemingly working fine, but it's dead slow. That's why I was wondering if there's any trick to run a multi-threaded application from a thread (actually, when I'm done testing I will be running at least 5 threads in parallell).
I spent like 6 hours working on this yesterday, so even though this is my first real attempt at threading in C#, I do believe I've invested enough time in this to try to involve the experts (that would be you guys :D )
Hopefully, this explanation was better. If not, I have to wait until my fever breaks and hopefully I'll be more coherent then ;)
Cheers!
Now where's my cough syrup...
Sam HobbsPosted Mar 14, 2010, 7:13 PM
I sure don't understand what you are asking. I don't undersand "multithread a multithreaded program". I don't understand what you mean by scraping, and I wrote the article called Introduction to Web Site Scraping. Also, when saying things such as "doesn't work" or "hangs", it is ususlly necesary to be more specific. Hopefully someone else will understand and can help.
Lars KPosted Mar 14, 2010, 4:17 PM
Sam HobbsPosted Mar 14, 2010, 2:44 PM