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. Threading

Threading

Scheduled Pinned Locked Moved ASP.NET
htmlregexperformancetutorialquestion
1 Posts 1 Posters 0 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.
  • M Offline
    M Offline
    Michael Mac
    wrote on last edited by
    #1

    I'm developing a Formatter class which will be used in a Web app. The formatter is responsible for replacing an occurrence of a text with some other text - regular expressions. I've coded a TextReplacement class which holds match and replacement values. Next, I created a collection (TextReplacementCollection) for it. I thought it would be a good idea to allow user to have more than one TextReplacementCollection instance in a Formatter so I've made another collection of key-and-value pairs - TextReplacementCollectionDictionary. For example, one collection could be used for replacing smiles and the other for securing html. Now I'm concern about the multithreading and performance issues. For example, one of the collection is being changed (admin page) and at the same time the formatter is using it for a formatting operation (forum page). What technique should I use to synchronize the collections so that it wouldn't slow the whole site down and wouldn't bring any unpredictable results?


    43 68 65 65 72 73 2c 4d 69 63 68 61 65 6c

    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