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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:58:23+00:00 2026-05-13T15:58:23+00:00

We are wanting to replace our current update system for the POS software at

  • 0

We are wanting to replace our current update system for the POS software at our stores. Currently, we have a folder on our webserver that hosts a script that our registers call every 30 minutes or so. They pass in their current version number, and the server returns an XML response containing any files that need to be updated, hash, and any other pertinent information for the register to download the updated files.

We want a service that will listen for UDP packets that we send out that we can use to trigger an update. This will keep the registers from unnecessarily polling for updates. We are writing an update server that will listen for a TCP connection from a machine, authenticate, do some logging, and then send along updates for the files that have changed. We want to move to a custom update server, because we have the need to release versions of the POS to certain machines for a trial run after testing before releasing it company-wide.

I’ve written the code to handle incoming connections and create a new thread to handle communicating with that client, etc, but I am having a hard time with handling file I/O in a multithreaded manner.

I’m pretty sure I won’t be able to just access a file by opening it from one thread if it’s already open in another. I don’t want to read the files into memory and keep them in a threadsafe container beforehand, since that would use a lot of memory, especially if it turns out I need to keep a copy for each thread in order to avoid threading issues.

What would be the best way to go about being able to access these files from disk/memory in a thread-safe manner without using a lot of memory or causing threads to wait on other threads to finish with the files?

EDIT: Forgot to mention we are using C#.

  • 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-13T15:58:23+00:00Added an answer on May 13, 2026 at 3:58 pm

    Multiple threads can open a file if it’s for reading only. Just set your file mode correctly.

    You will get errors (on Windows at least) if two threads try and open a read/write handle to a file.

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

Sidebar

Ask A Question

Stats

  • Questions 292k
  • Answers 292k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You don't need to create a new controller file. But… May 13, 2026 at 6:11 pm
  • Editorial Team
    Editorial Team added an answer I work for a company that has a "Middleware" department… May 13, 2026 at 6:11 pm
  • Editorial Team
    Editorial Team added an answer You can use Dispatcher.Invoke: Application.Current.Dispatcher.Invoke( (ThreadStart)delegate { // do your… May 13, 2026 at 6:11 pm

Related Questions

To our great surprise we found recently this . With SP1 for Windows 2003
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
To All, We are wanting to use Extended Properties as part of our database
I'm looking at a new project and we are wanting to use Flex (to
In C++ you are able to compile files that are not included in the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.