Shared Variables

Discussion in 'ASP .Net' started by Erica, Nov 18, 2008.

  1. Erica

    Erica Guest

    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?
    Erica, Nov 18, 2008
    #1
    1. Advertising

  2. Erica

    bruce barker Guest

    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?
    bruce barker, Nov 18, 2008
    #2
    1. Advertising

  3. Erica

    Erica Guest

    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?
    Erica, Nov 18, 2008
    #3
  4. Erica

    George Guest

    It depends on what you are doing with this property.
    And also on the datatype of the property.

    George.

    "Erica" <> wrote in message
    news:...
    > 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?
    George, Nov 18, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ Dev
    Replies:
    3
    Views:
    16,084
    Gandalf
    Feb 8, 2004
  2. avnrao
    Replies:
    0
    Views:
    3,343
    avnrao
    May 7, 2004
  3. Joe Fallon
    Replies:
    3
    Views:
    744
    =?Utf-8?B?Z3V5?=
    Jul 16, 2004
  4. ben
    Replies:
    3
    Views:
    499
    Kevin Spencer
    Nov 15, 2004
  5. Imran Aziz
    Replies:
    1
    Views:
    517
    Stefan
    Aug 22, 2005
Loading...

Share This Page