For Programmers: Free Programming Magazines  


Home > Archive > C# > October 2005 > SAFEARRAY & ThreadSafe









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SAFEARRAY & ThreadSafe
LearnMore.John@gmail.com

2005-10-11, 3:57 am


what is SAFEARRAY and ThreadSafe?

jon

Cuyler

2005-10-11, 7:00 pm

Hello,

SAFEARRAY is an array datatype used in C++ which keeps track of and
limits it's access bounds. In unmanaged C languages arrays are not
"safe". If you create an array of 5 elements and then assign a 6th
element nothing in the language will stop you, however you will get
some potentially serious overflow errors. SAFEARRAY fixes this
problem.

Threadsafe: This is a pretty complex topic, however it boils down to
this: An application (or object) is thread safe if it is able to
execute correctly when running simultaneously on multiple threads. A
great example is the idea of a "Pure Function" in C: The function only
uses arguments passed in, only uses variables that are allocated on the
stack, only calls other functions with similar properties and is
reentrant.

Hope that helps some.


Cheers,

Cuyler

LearnMore.John@gmail.com

2005-10-13, 8:02 am

thanks for the reply

msdn is one of the strong reason why i like MicroSoft!!!

MSDN:
http://msdn.microsoft.com/library/e....asp?frame=true

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com