GTK2: g_thread_init deprecated

Viewed 5206

This is my first attempt at making a threaded piece of software. It's gonna be GTK2 based on Arch Linux.

I followed the example from here:

Threaded animation with Cairo

Using the example with SIGALRM at the bottom.

I get the following warning when I compile:

warning: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations]
if (!g_thread_supported ()){ g_thread_init(NULL); }

I'm trying to find information on how I'm supposed to go about this. The only things that come up online with this warning is bug reports of software throwing the same error when it compiles. Lots of the report seem like they say to just remove the line.

Do I just remove that line and keep the rest intact? Or is there a better way to go about this?

I am making a infotainment system to be ran on Raspberry Pi Model B with a touch screen and I wanna make sure it feels snappy like an iPhone hence why I wanna run the graphics and user input stuff in a high priority thread.

If anyone could point me in the right direction for this type of stuff, it would be greatly appreciated. Any piece of online literature would help as well as books on the subject if necessary.

Thanks in advance.

1 Answers
Related