我有一个关于 c++ pthread 的问题。
如果我有一个 Thread1 和 Thread2。
有没有办法在从 Thread1 调用的 Thread2 上执行 Thread2 方法?
//code example
//we can suppose that Thread2 call has a method
void myThread2Method();
//I would to call this method from Thread1 but your execution must to run on Thread2..
thread1.myThread2Method()
我想知道是否存在类似于 Obj-c 中的 performSelector OnThread 的方式。