![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
From the description, read access is permitted even if the stream is locked. So, it looks like the creation of the PDF file and the |
#2
| |||
| |||
|
|
I do not quite understand the race condition. As I posted a couple of days ago, I create a PDF on the fly in my web application at regular intervals. Users will be able to download the PDF file. Suppose, at the time when my application is in the process of generating the PDF file (which takes around 2.5 minutes), a user tries to download it, will this be a problem? I checked the Lock method of FileStream. The description of this method says: Prevents other processes from changing the FileStream while permitting read access. From the description, read access is permitted even if the stream is locked. So, it looks like the creation of the PDF file and the downloading of this file can happen at the same time without a problem, right? Thanks. |
#3
| |||
| |||
|
|
antonyliu2... (AT) yahoo (DOT) com> wrote in message news:1185465692.824127.146650 (AT) l70g2000hse (DOT) googlegroups.com... I do not quite understand the race condition. As I posted a couple of days ago, I create a PDF on the fly in my web application at regular intervals. Users will be able to download the PDF file. Suppose, at the time when my application is in the process of generating the PDF file (which takes around 2.5 minutes), a user tries to download it, will this be a problem? I checked the Lock method of FileStream. The description of this method says: Prevents other processes from changing the FileStream while permitting read access. From the description, read access is permitted even if the stream is locked. So, it looks like the creation of the PDF file and the downloading of this file can happen at the same time without a problem, right? Thanks. Perhaps you could do one of the following: 1. Create the PDF with a different name than the name which users will download. Once the PDF is created then delete the old one and change the name of the new one to the download name. 2. Disable the mechanism (button ??) to download the file while a new on is being created. Hope this helps, Lloyd Sheen |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |