我在C库中有全局静态变量,它在多线程运行中生成异常.我需要以某种方式使它们安全(即,每个线程应该与这些变量的不同实例相关).任何推荐的方法?
c multithreading static-variables
c ×1
multithreading ×1
static-variables ×1