Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Application variable with sync

Application variable with sync

Scheduled Pinned Locked Moved ASP.NET
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anishkannan
    wrote on last edited by
    #1

    Hi.. In my code, i have to do the process at a time with single request, for that i added one Application variable checking with true or false. Some times multiple user given a same request, have to say message. In rare case, this condition make as false.. so two request executing at a moment. so i will plan to make as a synchronize using lock( obj). object is static readonly. My doubt is, if i make web garden, it will run more than one process.. its may affect application variable or static object locking mechanism... Or any other mechanism have to follow. Suggest!!!

    D 1 Reply Last reply
    0
    • A anishkannan

      Hi.. In my code, i have to do the process at a time with single request, for that i added one Application variable checking with true or false. Some times multiple user given a same request, have to say message. In rare case, this condition make as false.. so two request executing at a moment. so i will plan to make as a synchronize using lock( obj). object is static readonly. My doubt is, if i make web garden, it will run more than one process.. its may affect application variable or static object locking mechanism... Or any other mechanism have to follow. Suggest!!!

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      Check this out ... sp_gatapplock - Places a lock on an application resource. http://msdn.microsoft.com/en-us/library/ms189823.aspx[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups