One more thing
Showing posts with label
rand
.
Show all posts
Showing posts with label
rand
.
Show all posts
Wednesday, July 18, 2007
rand真的需要semaphore保護
嗯 一個工作上遇到的實例
實際案例是底下有10個client, 透過task,
共同存取rand(), 結果有2,3組重覆的數字產生
這時才不得不相信rand()是global resource
也是需要 semaphore 來保護的
Older Posts
Home
Subscribe to:
Posts (Atom)