I have created an thread in the following way.. But how to stop it or finish 
it. I am confused about locking and unlocking the thread.
and kindly suggest me, is it a right way to create a thread for doing some 
heavy computation. as you see I am using the break but i don't think so its 
working. now what i am doing is to stop this thread, i switched using a button 
with if else statement.
actually it is working in my current program but sometime it makes some short 
delay or something like that. Delay is because of some heavy computation i 
think so. But whatever the computation will be, it should work smoothly. right?


void* MultiThread(void* p)
{
        for (;;)
        {
                if(isV)
                {

                        if(nb > 0)
                                for (int ix = 0; ix<nb; ix++)
                                        ComputeV(ix);
                }
                else
                        break;

        }
        return 0L;
}

somewhere in program:

Fl::lock();
fl_create_thread(V_thread, MultiThread, 0);

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to