If I have a global array: Texts.s(10) and 10 threads accessing this array but only on her index number, should I use a mutex because the array is global or not needed because each thread access only her index position?
Thread_0 can access only to Texts(0)
Thread_1 can access only to Texts(1)
and so on...
About arrays mutex and threads...
- NicTheQuick
- Addict

- Posts: 1527
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: About arrays mutex and threads...
In this case you should be fine with using no Mutex at all. But you still have to enable the threadsafe option in the compiler options because you are handling strings.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: About arrays mutex and threads...
That's what I thought, but I want to be sure because it's a pain to find related errors later.
Thanks by your help
Thanks by your help