[Haskell-cafe] Re: Hugs vs GHC (again)
Gracjan Polak
gracjan at acchsh.com
Tue Jan 11 08:49:27 EST 2005
Marcin 'Qrczak' Kowalczyk wrote:
>
> "fileRead :: File -> FileOffset -> Integer -> Buffer -> IO ()"
>
> This is unimplementable safely if the descriptor is read concurrently
> by different processes. The current position is shared.
>
UNIX98 defines function:
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
__off_t __offset);
Windows has:
BOOL ReadFile(
HANDLE hFile,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
LPDWORD lpNumberOfBytesRead,
LPOVERLAPPED lpOverlapped
);
Where that OVERLAPPED structure contains information where to start read.
Seems implementable to me, or am I wrong?
--
Gracjan
More information about the Haskell-Cafe
mailing list