Is there a non-blocking version of hGetArray?
Peter Simons
simons at cryp.to
Fri Oct 1 03:44:34 EDT 2004
Hi,
I am a happy user of hGetBufNonBlocking, but I have come to
realize that mutable arrays are nicer to work with than
pointers, so I have considered using hGetArray instead. I
do, however, depend on the fact that the function returns as
soon as it has read data -- even if less than requested --,
like hGetBufNonBlocking does.
Is there currently a way to achieve this?
Am I right assuming that hGetBuf and hGetArray do not differ
much performance-wise?
One of the reasons I am curious about using mutable arrays
is because of Data.Array.Base.unsafeRead, which seems to be
a *lot* faster than accessing the memory through a pointer.
Is there anything comparable for pointer access?
Peter
More information about the Glasgow-haskell-users
mailing list