You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler and linker open some source files with exclusive access instead of read-share access. This causes intermittent problems when performing multi-core builds. Any files that are only being read should be opened with read-share access so that multiple threads / processes can read the file simultaneously.
Originally opened by thomas.hammond
The text was updated successfully, but these errors were encountered:
Please be more specific. Which source files? Which tools? Source files in the compiler are opened with read sharing. Have you looked at anti-virus interference?
I think it was coming from the linker when it was reading an ICO file to use as the package icon. After taking a closer look at the 3.8 code, it looks like there is only once place where this is happening (I thought there were more, but I was wrong), and it is stinging us randomly. Here is the offending line:
The default FileShare mode is None, so if one thread is reading the icon, no other threads can also open it for read. I think this needs to be changed so that other threads can read the file:
-> using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read))
Or it could just be changed to use File.OpenRead, which automatically uses FileShare.Read under the covers. This is what is done in many places for Wix read operations.
The compiler and linker open some source files with exclusive access instead of read-share access. This causes intermittent problems when performing multi-core builds. Any files that are only being read should be opened with read-share access so that multiple threads / processes can read the file simultaneously.
The text was updated successfully, but these errors were encountered: