[quote][b]下面引用由[u]xh780927[/u]在 [i]2002/11/25 04:23pm[/i] 发表的内容:[/b] 拜托能不能不要搞这么复杂啊,我只是想知道 我如何在子线程里修改这个全局变量的值,最简单的方法就可以了,请哪位大侠在百忙之中回答俺一下 [/quote]Between Processes, there are no 简单的方法, you have to use SYSV IPC - share memory. Between Threads, you may change the global var directly, other threads belong to the same process would see your change Immediatlly.(If more than one thread would have to write the same var, you have to do something for threads sync.)
|