3. 不是所有的CPU都有类似的指令可以直接操作内存地址。好像RISC的alpha就没有,而需要经过寄存器中转。作者: F3&F5 时间: 2004-07-15 20:42 标题: STL自己的函数也会出错!!? 懂了,谢谢作者: tp801 时间: 2004-07-17 11:30 标题: STL自己的函数也会出错!!? One word: STL is NOT multi-thread safe! You had to protect it with any suitable locking machinizm.作者: yunin 时间: 2004-07-18 23:55 标题: STL自己的函数也会出错!!? simultaneous read access to the same container from within separate threads is safe;
simultaneous access to distinct containers (not shared between threads) is safe;
user must provide synchronization for all accesses if any thread may modify shared container.作者: yunin 时间: 2004-07-18 23:59 标题: STL自己的函数也会出错!!? http://www.sgi.com/tech/stl/thread_safety.html
这里有说到STLport的线程安全的问题,有兴趣的可以看看,会有帮助的。作者: eagerly1 时间: 2004-07-19 14:37 标题: STL自己的函数也会出错!!? 假定任务为:A B A B A B A B A B A B A B A B。。。
其中A、B都是要执行的。
在单线程下,执行顺序为:A->;B->;A->;B->;A->;B->;A->;B->;A->;B...