Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:08:20+00:00 2026-06-04T18:08:20+00:00

Can I get an example usage that is not related to either DB or

  • 0

Can I get an example usage that is not related to either DB or File-IO?

I’ve read about IEnlistmentNotification and Transactions and was wondering if I can use Transactional behavior for my custom classes (like my own resource manager) which is in memory only?

Scenario I was wondering –
Let’s say I have some data structure in memory which has some 5 properties (thread safe).
I launch 5 threads to update one property each (lets say its computationally intensive).
Now 4 may succeed and 5th may fail in which case I want to roll-back my data structure to its original state. Can I implement DependantTransaction for this case?

PS: I know I can manually save a cloned copy, revert it back in catch block, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:08:22+00:00Added an answer on June 4, 2026 at 6:08 pm

    There have been some 3rd-party implementations of transaction-scope providers for in-memory objects; however, generally speaking they’re a bit flakey and not really worth the pain – especially since you are using threading. Frankly, I strongly suggest you look more at regular memento patterns, or immutable data structures that don’t need rolling back (i.e. you just discard the separate, mutated copy).

    Yes it can probably be done, but unless writing a transaction-scope provider is the purpose of your project, I would recommend you focus on delivering application logic first. Just sayin’

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am setting up a solr built into tomcat. I can get the example
how can i get for example the integer codeInt=082 from String code='A082' i have
I meam for example I can get var collection = from c in el.Descendants(current_conditions)
How i can get full right name of generic type? For example: This code
I've set up a very simple example with LINQ-TO-SQL in WPF. I can get
Can I get a sample PHP code example which calls SmartyStreets LiveAddress API for
Can anyone get me a login page example for iphone ?
Can I get an element if its class contains some text? Example: <div class=headerbody></div>
How can I get only unique departments from the below example? Dept Id Created
How can I get the number of a day in a week fro example:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.