473,947 Members | 9,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1199
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*****@discus sions.microsoft .com> escribió en el mensaje
news:8F******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> escribió en el mensaje
news:8F******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> escribió en el mensaje
news:8F******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> escribió en el mensaje
news:8F******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> escribió en el mensaje
news:B9******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> escribió en el mensaje
news:B9******** *************** ***********@mic rosoft.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
3556
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 python scripts as I can with MySQLdb. But I cannot even connect to the access database (see below). Could anyone explain it to me as simple as possible please. I'm using Windows XP, ActivePython 2.3.2 build 230 and Microsoft access(XP?)
3
3207
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 unless your session ends One more thing Session variables can very much be used in Application events
1
4527
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 and then begin reading from this new point, or to read the contents of a StreamReader more than once." I am not able to understand what exactly this means.
5
3623
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 instruction document (not data based) - same as using an xml web control. The resulting html is on the client? but what about the server side of things? Trying to figure out how to change and save the xmlDocument. It I put a button OUTSIDE of the...
12
3099
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
2223
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 i'm using the treenodes and each treenode needs a unique entry into my rich text box. After sitting at home with MSDN i've managed to get this functionality by storing a RTF string in the tag property of the treenode. On every 'before update' of the...
9
2119
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 when the web site does XYZ, what SQL does it run on the DB2 database? Unfortunately everyone who knew about how it works has left and I've never even seen a DB2 database before today! So, I appear to be looking at an IBM DB2 Universal Database...
61
3662
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. Furthermore, he doesn't even mark the assignments, but rather gives tips and so forth when going over students' work. To test students' capabilities for the purpose of state exams and qualifications though, he actually sits down with us at a...
3
1475
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; p=ch; printf("Character is %c\n", *p);
2
2201
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)); printf("sizeof=%d\n", sizeof(a)); printf("%d %d", strlen(a),sizeof a);
0
10163
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9982
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10692
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9888
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7430
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6116
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6332
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4946
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4538
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.