|
-
Jun 11th, 2001, 12:35 PM
#1
Thread Starter
Member
multithreading
i've app with cca 30 runing threads (in the same time...). they all use global defined int array. but each change and use its own index of this array (100 %). do i have to place the code where the array is changing in each thread to critical section or anything else?
-
Jun 11th, 2001, 01:17 PM
#2
Monday Morning Lunatic
You only need to protect against it if >1 thread access the *same* data.
If they only keep to the data in their own index in the array there's no need.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|