Click here to Skip to main content
14,970,418 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a method like:
C#
public byte[][] gbyte = new byte[10][];
void ImageProcess(byte[] input)
{
   // ...
}

void Main()
{
    for (int i = 0; i < 10; i++)
    {
        // ...
        ImageProcess(gbyte[i]);
    }

}

Now each byte[] taking 15 second to process in ImageProcess(), taking total 150. I tried to apply threading but it taking same time.
Any suggestion.

Thanks,

GP
Posted
Updated 6-Sep-10 10:12am
v2
Comments
Sandeep Mewara 6-Sep-10 13:03pm
   
What do you mean by 'I tried to apply threading but it taking same time'? Can you update your question what you tried for Multithreading?

1 solution

If a multi-threaded program takes the same to execute as single-threaded, it means one of the following (or both):

1. Your computer has only 1 core (it's unable to execute more than 1 thread at a time).

2. Your multi-threading solution is wrong and it is actually not multi-threading at all.

I can't give you any help unless I know more about your program. The best advice I can give you now is: Try harder, optimize your algorithm and confirm that your program is actually using multiple threads.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900