why dynamic arrays are not thread safe

Login to reply to this topic.
Thu, 2005-11-03 10:12
Joined: 2004-12-31
Forum posts: 83
hi

i am posting a new thread as harddisk crash has taken down the previous one. also i have  not checked the thread for last 2 days so if any one has posted any thing in last 2 days, i request to please do it again.



the following document on nokia's website says that few resources including dynamic arrays should only be used in main thread as they are not thread safe.

http://sw.nokia.com/id/8e18e213-3866-4567-bf1b-a04f938bb47e/Symbian_OS_Threads_Programming_v1_0_en.pdf

warm regards

saurabh


Fri, 2005-11-04 06:34
Joined: 2004-12-31
Forum posts: 83
Re: why dynamic arrays are not thread safe
i got an answer on nokia forum.

if dynamic arrays are shared b/w diff threads and are realloced in both then we'll have synchronisation problem. that means that the other thread will not come to know the updated new address of the array. this explanation seems to be reasonable, but if some one has other explanations also please come forward.

thanx.

warm regards

saurabh

  • Login to reply to this topic.