1
Hi!
Is it possible to use the mutexes like this:
the provided data is a picture from my webcam at about 15 frames per second.
the process is displaying the picture as an openGL-texture.
it's part of a big project, so there will be no other way of doing it.
i have tried it like this but it doesn't work:
what can i do? :)
Is it possible to use the mutexes like this:
Code: [Select]
void thread_1()
{
while(1)
{
wait_for_important_data();
process_important_data();
}
}
void thread_2()
{
while(1)
{
provide_important_data();
sleep(0.07 seconds);
}
the provided data is a picture from my webcam at about 15 frames per second.
the process is displaying the picture as an openGL-texture.
it's part of a big project, so there will be no other way of doing it.
i have tried it like this but it doesn't work:
Code: [Select]
void thread();
{
while(1)
{
provide_data();
mutex.unlock();
}
}
void main();
{
thread.launch();
while(1)
{
mutex.lock();
use_data();
}
}
what can i do? :)