От: | Аноним | ||
Дата: | 08.05.13 14:05 | ||
Оценка: |
On the other hand, you can create a FileStream object by specifying the FileOptions.
Asynchronous flag. Then you can call FileStream’s Read method to perform a synchronous
operation. Internally, the FileStream class emulates this behavior by starting an asynchronous
operation and then immediately puts the calling thread to sleep until the operation is
complete. This is also inefficient, but it is not as inefficient as calling BeginRead by using a
FileStream constructed without the FileOptions.Asynchronous flag.