473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

please explain

hey all,

i was wondering when you lookup commands in MSDN help in the description
you'll often see it say that it's threadsafe or not. i know kinda what a
thread is (needle and thread right? j/k :) no i really know a little about
threads, but in lamen terms what does threadsafe mean?

thanks,
rodchar
Nov 21 '05 #1
6 1171
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the class.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:8F**********************************@microsof t.com...
hey all,

i was wondering when you lookup commands in MSDN help in the description
you'll often see it say that it's threadsafe or not. i know kinda what a
thread is (needle and thread right? j/k :) no i really know a little about
threads, but in lamen terms what does threadsafe mean?

thanks,
rodchar

Nov 21 '05 #2
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the class.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:8F**********************************@microsof t.com...
hey all,

i was wondering when you lookup commands in MSDN help in the description
you'll often see it say that it's threadsafe or not. i know kinda what a
thread is (needle and thread right? j/k :) no i really know a little about
threads, but in lamen terms what does threadsafe mean?

thanks,
rodchar

Nov 21 '05 #3
thanks this helped.

"Carlos J. Quintero [.NET MVP]" wrote:
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the class.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:8F**********************************@microsof t.com...
hey all,

i was wondering when you lookup commands in MSDN help in the description
you'll often see it say that it's threadsafe or not. i know kinda what a
thread is (needle and thread right? j/k :) no i really know a little about
threads, but in lamen terms what does threadsafe mean?

thanks,
rodchar


Nov 21 '05 #4
thanks this helped.

"Carlos J. Quintero [.NET MVP]" wrote:
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the class.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:8F**********************************@microsof t.com...
hey all,

i was wondering when you lookup commands in MSDN help in the description
you'll often see it say that it's threadsafe or not. i know kinda what a
thread is (needle and thread right? j/k :) no i really know a little about
threads, but in lamen terms what does threadsafe mean?

thanks,
rodchar


Nov 21 '05 #5
Well, just to be correct the phrase:

" modifies variables, etc. since they must lock the access before modifying.
"

should read

" modifies variables, etc. so you must must lock the access in your code
before modifying. "

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:B9**********************************@microsof t.com...
thanks this helped.

"Carlos J. Quintero [.NET MVP]" wrote:
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before
modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally
only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the
class.

Nov 21 '05 #6
Well, just to be correct the phrase:

" modifies variables, etc. since they must lock the access before modifying.
"

should read

" modifies variables, etc. so you must must lock the access in your code
before modifying. "

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"rodchar" <ro*****@discussions.microsoft.com> escribió en el mensaje
news:B9**********************************@microsof t.com...
thanks this helped.

"Carlos J. Quintero [.NET MVP]" wrote:
You know that 2 threads can cause problems when trying to modify the same
variable at the same time, or calling the same method which internally
modifies variables, etc. since they must lock the access before
modifying.
The documentation specifies which methods are threadsafe, that is, which
methods can be called safely from a thread without writing locking
statements before making the call in the code of the thread. Normally
only
static methods are safe-thread since they are stateless (kind of self
contained), while instance-methods can modify member variables of the
class.

Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: DD | last post by:
Hello, Could anyone please help me?? Is there somebody who could explain me how to make a connection to a access database with a python cgi script. I would like to use common sql commands in my...
3
by: VijayShankar | last post by:
Can u be more specific on your question Anyway its not like Session variables are available for sometime and not available for sometime. When your session starts it is very much available...
1
by: Yash | last post by:
Hi, Can someone please explain to me what the StreamReader.DiscardBufferedData method does? The documentation says "Use DiscardBufferedData to seek to a known location in the underlying stream...
5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
12
by: Sanjeev | last post by:
Output of followin program at Turbo C++ 3.0 is 7 ( Not 2 or 3). Please explain why ? //////////////////////////////////////////////// #include<stdio.h> #include<string.h> void main() {
2
by: garyusenet | last post by:
I could do with something similiar, can you tell me if you think this would work for me, and if there's any advantage in working with controls this way than how I currently am. At the moment...
9
by: colin.mcnulty | last post by:
Hi, I'm a SQL Server DBA, but I guess that won't buy me any friends round here huh? ;-) I've been asked to look at the SQL that's being executed on a DB2 database from a web app, specifically...
61
by: warint | last post by:
My lecturer gave us an assignment. He has a very "mature" way of teaching in that he doesn't care whether people show up, whether they do the assignments, or whether they copy other people's work....
3
by: sathishc58 | last post by:
Hi All, Here is the code which generates Segmentation Fault. Can anyone explain why the third printf fails and the first printf works? main() { char ch={"Hello"}; char *p; ...
2
by: sathishc58 | last post by:
Hi All Please explain why strlen returns() "16" as output here and explain the o/p for sizeof() as well main() { char a={'a','b','c'}; printf("strlen=%d\n", strlen(a));...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.