In a plugin I run several threads. However, the program that the plugin accesses is single threaded. I need a way to call functions in the program from the 'main' thread, not the new threads. I can't find a POSIX function (pthread) that allows me to call a function in the main thread from the child thread.
Does anyone know of a function?