my test program now looks like this:
main thread:
initialize sharedArray[i] = -1
create thread from start_cb()
call output()
output()
{
for (i..30000)
{
while(sharedArray[i] != -1) Sleep(10)
display sharedArray[i]
}
}
worker thread:
{
for (i .. 30000)
{
sharedArray[i] = xxx
}
}
but the running time of the worker thread takes 3 times more than running
without using multithreading in single core, even running it in dualcore. is
there a better approach? and why running on multicore does not help?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk