Hi again,

I guess it would make sense to apply this now, since there's no knowing
how long Don can get around to updating the bytestring-mmap package.

On Wed, Feb 04, 2009 at 18:33:46 +0100, Petr Rockai wrote:
> PS: The patch also changes one occurence of Prelude.catch to
> Control.Exception.catch. Hopefully that doesn't change semantics of
> anything. Prelude.catch is unable to catch the mmap error, and is generally
> unreliable as far as I can tell.

But, first, could you please check on the possible risks on our other
use of the catch function in the ByteStringUtils module?  It looks like
there is only one.

Handle empty files in mmapFilePS. Also cater for FD shortage.
-------------------------------------------------------------
> +  x <- unsafeMMapFile f
> +   `catch` (\_ -> do
> +                     size <- fileSize `fmap` getSymbolicLinkStatus f
> +                     if size == 0
> +                        then return B.empty
> +                        else performGC >> unsafeMMapFile f)

Second: will there be any weird performance consequences if we're
calling performGC on every mmapFilePS?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to