Using ReadFile from different threads

This is a discussion on Using ReadFile from different threads within the C++ Programming forums, part of the General Programming Boards category; Every thread has another handle to the file (the same file to all) in order that every handle will hold ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    37

    Using ReadFile from different threads

    Every thread has another handle to the file (the same file to all) in order that every handle will hold its own offset.
    Anyway, is it safe to read from the file in several thread at the same time without locking?
    I believe so but I am not sure..
    thanks

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    2,804
    As long as no process tries to modify the file, reading the file in multiple processes should be no problem.

    Jim

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    37
    Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ReadFile Help
    By Anddos in forum Windows Programming
    Replies: 1
    Last Post: 12-12-2011, 12:10 PM
  2. ReadFile();
    By Queatrix in forum Windows Programming
    Replies: 8
    Last Post: 05-02-2005, 02:42 PM
  3. readfile
    By ZeroG in forum Windows Programming
    Replies: 3
    Last Post: 09-21-2004, 08:20 AM
  4. fread readfile
    By samsam1 in forum Windows Programming
    Replies: 3
    Last Post: 02-03-2003, 01:14 PM
  5. ReadFile?
    By SyntaxBubble in forum Windows Programming
    Replies: 2
    Last Post: 10-23-2001, 01:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21