rmatthew Posted May 7, 2003 Posted May 7, 2003 I have two threads that need to access the one file. One writes to it and one needs to move the file (esentially delete the file from it's current location and archive in a different directory). Although I haven't seen it happen it would be possible that one thread is attempting to write while the other thread is trying to move the file. Ideas? Thanks in advance. Quote
*Gurus* Derek Stone Posted May 7, 2003 *Gurus* Posted May 7, 2003 would [it] be possible that one thread is attempting to write while the other thread is trying to move the file[?]Yes, absolutely. Either move both file operations to run consecutively on one thread, or create a [msdn=System.Threading.Mutex]mutex[/msdn] indicating that the file is being accessed. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.