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 981575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:33:49+00:00 2026-05-16T04:33:49+00:00

I have a class, ProcessorClass. It has two methods Start() and Stop(). When you

  • 0

I have a class, ProcessorClass. It has two methods Start() and Stop(). When you hit start, it internally creates a bunch of threads that do some processing and, if they find something relevant, fire an event.

My form frmMain (this is a windows forms app .net 3.5) has an instance of this class and is catching these events. Each time an event is caught, something gets inserted into the database. Am I right in concluding that this strategy will ensure synchronous inserts? I can’t have multiple threads trying to do data operations as that would cause me to lose data.

  • 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-05-16T04:33:49+00:00Added an answer on May 16, 2026 at 4:33 am

    No, these won’t be synchronous inserts, especially on multicore machines. Rather than going back to single-threading, or locking on some object in memory, I’d suggest putting concurrency handling in your database updates. You can do that without locks in the database by using a WHERE clause to check old values on the same statement that does the update. If the result has zero rows inserted, then the concurrency check saved you from data corruption.

    However, if you don’t have a retry mechanism that works for your business rules, you’ll need to add concurrency specifications to your database transactions. (i.e., open a transaction, attach it to your command, and set the transaction concurrency level to the level of safety that you need).

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

Sidebar

Related Questions

I have a base class that has some functionality that uses type inference... public
I have class class DateOptTimeType implements org.hibernate.usertype.UserType that works with two columns @org.hibernate.annotations.Type(type =
I have class A and class B. class A has a bunch of variables
I have class B that has class A, this is simplified version of class
I have class User that contains protected constructor and class Account that has access
I have class which has a method that needs to return three DataTables. I
I have class, that has a NSString. @interface AudioManager : NSObject { AudioData *data_;
I have class that extend FragmentActivity in it I add fragment to layout as
I have class grades that I need to check if a specific grade is
I have class that looks like this: class A { public: class variables_map vm

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.