Click to See Complete Forum and Search --> : Thread Safe ...
anantwakode
February 14th, 2006, 03:47 AM
Hi,
what is exactly this thread safe is...
what care should we take to write thread safe functions.
-Anant
Kheun
February 14th, 2006, 04:01 AM
Thread safe is usually referring to a function or object being simulatenously entered or accessed by multiple threads while it is able to ensure that shared data is not corrupted.
In order to make your function or class thread safe, you can make it reentrant so that there is no shared data. If shared data is needed, you can use mutex to limit such that only a thread can access the function or object at any time.
anantwakode
February 14th, 2006, 07:17 AM
Thanks !!!
You mean to say shared data.....like
Disk File, Global variables........ am I right ?
you can make it reentrant ??? Please...
-Anant
Andreas Masur
February 14th, 2006, 07:48 AM
Thread-Safe (http://en.wikipedia.org/wiki/Thread-safe)
anantwakode
February 15th, 2006, 02:12 AM
Thanks Guru !!!
-Anant
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.