File Locking Forced? Newbie question.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sparky

    File Locking Forced? Newbie question.

    Hello! I am writing some software that will have many users accessing
    the same file resource at once for reading purposes only. I am
    programming on (Ubuntu) Linux and my question is in Windows, can I
    have it so that the same file can be open in read mode by more than
    one person or could Window's file locking system get in the way?

    Thanks,
    Sam
  • Tim Golden

    #2
    Re: File Locking Forced? Newbie question.

    Sparky wrote:
    Hello! I am writing some software that will have many users accessing
    the same file resource at once for reading purposes only. I am
    programming on (Ubuntu) Linux and my question is in Windows, can I
    have it so that the same file can be open in read mode by more than
    one person or could Window's file locking system get in the way?
    Assuming your question is: can processes A, B & C read
    from the same file at the same time, then: Yes. (You
    can try it out yourself fairly easily if you want. Just
    open a clutch of interpreter windows and do some
    open ("abc.txt", "r").read () stuff in each one).

    But I'm surprised you think that anything might get
    in the way of that. It would be a fairly limiting file
    system which prevented multiple simultaneous readers.

    TJG

    Comment

    • Sparky

      #3
      Re: File Locking Forced? Newbie question.

      On Jul 15, 11:38 am, Tim Golden <m...@timgolden .me.ukwrote:
      Sparky wrote:
      Hello! I am writing some software that will have many users accessing
      the same file resource at once for reading purposes only. I am
      programming on (Ubuntu) Linux and my question is in Windows, can I
      have it so that the same file can be open in read mode by more than
      one person or could Window's file locking system get in the way?
      >
      Assuming your question is: can processes A, B & C read
      from the same file at the same time, then: Yes. (You
      can try it out yourself fairly easily if you want. Just
      open a clutch of interpreter windows and do some
      open ("abc.txt", "r").read () stuff in each one).
      >
      But I'm surprised you think that anything might get
      in the way of that. It would be a fairly limiting file
      system which prevented multiple simultaneous readers.
      >
      TJG
      Thank you. For some reason I thought there was a file locking system
      on Windows (http://en.wikipedia.org/wiki/
      File_locking#Fi le_locking_in_M icrosoft_Window s). But, I believe that
      that only applies to those using Microsoft's file methods and only for
      writing. Thanks for clearing that up.

      Sam

      Comment

      Working...