Multi-threading
-
I have all my data stored in DataTables, when I run my program using multi-threading I get an error message. I don't remember the exact wording but, it said index out of bounds of the array. However it does not appear to be out of bounds. When I run the program without using the multi-threading everything is fine. Also, most of my methods are static, I lock the datatables when loading data. I can't find where the problem exist, because where I believe the program line failed it does not show it as being out of bounds. Any help would be greatly appreciated, thanks in advance. Michael
-
I have all my data stored in DataTables, when I run my program using multi-threading I get an error message. I don't remember the exact wording but, it said index out of bounds of the array. However it does not appear to be out of bounds. When I run the program without using the multi-threading everything is fine. Also, most of my methods are static, I lock the datatables when loading data. I can't find where the problem exist, because where I believe the program line failed it does not show it as being out of bounds. Any help would be greatly appreciated, thanks in advance. Michael
If you're deleting in one thread while retrieving in another, you can get an out of bounds if you don't protect against it.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
I have all my data stored in DataTables, when I run my program using multi-threading I get an error message. I don't remember the exact wording but, it said index out of bounds of the array. However it does not appear to be out of bounds. When I run the program without using the multi-threading everything is fine. Also, most of my methods are static, I lock the datatables when loading data. I can't find where the problem exist, because where I believe the program line failed it does not show it as being out of bounds. Any help would be greatly appreciated, thanks in advance. Michael
Without seeing the code it's impossible for anyone to tell you what's going on.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak