473,395 Members | 1,941 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,395 software developers and data experts.

Shared Variables

I have a shared property. Is it possible that if two seperate users hit this
property at once that it might return the same value to both since only one
instance is being created?
Nov 18 '08 #1
4 1084
yes. thats the point of shared variables, they are shared between all
requests, and if one changes its changed for both.

-- bruce (sqlwork.com)
"Erica" wrote:
I have a shared property. Is it possible that if two seperate users hit this
property at once that it might return the same value to both since only one
instance is being created?
Nov 18 '08 #2
should I then use syncLock?

"bruce barker" wrote:
yes. thats the point of shared variables, they are shared between all
requests, and if one changes its changed for both.

-- bruce (sqlwork.com)
"Erica" wrote:
I have a shared property. Is it possible that if two seperate users hit this
property at once that it might return the same value to both since only one
instance is being created?
Nov 18 '08 #3
It depends on what you are doing with this property.
And also on the datatype of the property.

George.

"Erica" <Er***@discussions.microsoft.comwrote in message
news:BA**********************************@microsof t.com...
should I then use syncLock?

"bruce barker" wrote:
>yes. thats the point of shared variables, they are shared between all
requests, and if one changes its changed for both.

-- bruce (sqlwork.com)
"Erica" wrote:
I have a shared property. Is it possible that if two seperate users hit
this
property at once that it might return the same value to both since only
one
instance is being created?
Nov 18 '08 #4
No if this is to solve the problem you mentioned in another thread. If you
don't want to share data accross users, don't use shared variables.

Always solve the problem at the source rather than to cure its consequences.

--
Patrice
"Erica" <Er***@discussions.microsoft.coma écrit dans le message de groupe
de discussion : BA**********************************@microsoft.com...
should I then use syncLock?

"bruce barker" wrote:
>yes. thats the point of shared variables, they are shared between all
requests, and if one changes its changed for both.

-- bruce (sqlwork.com)
"Erica" wrote:
I have a shared property. Is it possible that if two seperate users hit
this
property at once that it might return the same value to both since only
one
instance is being created?

Nov 18 '08 #5

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

Similar topics

3
by: tom | last post by:
Hello, I'm using the ms data access application blocks. My question is about the fact that everywhere shared methods are used. Does this mean that when more than 1 user at the same time...
6
by: Paul | last post by:
Hi. Just trying to find out the best approach as I beleive it might give me problems later on down the road. I have an ASP.NET application which references a shared database class which...
1
by: Torsten Mueller | last post by:
I have to create a shared library containing C++ classes with static member variables on HPUX with aCC. I can compile and link the library and a test application but when I start the program I get...
4
by: John Kraft | last post by:
Hi all, My question is more of a phylisophical one here, but I am wondering what the difference is (effectively and performance wise) between using a shared variable/static variable and using a...
9
by: Bob Day | last post by:
VS 2003, vb.net , sql msde... I have an application with multiple threads running. Its a telephony application where each thread represents a telephone line. For code that would be the same...
8
by: gemel | last post by:
I have been reading sime material in .NET that throws some doubt on my understanding of shared procedures. With regard to object programming I assumed that variables declared within a class were...
5
by: Confused ! | last post by:
I am writing an ASP.NET application and I want to use shared members on the data layer to retreive information from the SQL Server. If I declare a Function to be Shared, how will this affect...
2
by: Ibrahim. | last post by:
Hello, My question is simple. If Session variables were to be assigned a value inside a shared function, does the session data visible to other sessions (Other users). I know the variables...
15
by: Laser Lu | last post by:
I was often noted by Thread Safety declarations when I was reading .NET Framework Class Library documents in MSDN. The declaration is usually described as 'Any public static (Shared in Visual...
0
by: netkadirisani | last post by:
Hi, i built a dll (used vb.net) that has some shared variables. the basic idea of using the shared variables is to read some values from the database and save them in the shared variables during the...
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
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...
0
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...

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.