I tried your example on 6.12.3 and it worked fine for me (Windows 7).


Ryan Yates


On Thu, Aug 5, 2010 at 1:35 AM, Adolfo Builes <builes.adolfo@googlemail.com> wrote:
Hi All:

I have been trying to use System.timeout in windows, but for some
reason it doesn't work, a concrete example is:

import Network.HTTP
import System.Timeout

main = do
 rsp <- timeout 10000000  $ simpleHTTP $ getRequest "http://10.1.2.3"
 case rsp of
   Just rsp -> print $ show  rsp
   Nothing  -> error "Nothing"

In this case I would expect to receive "Nothing" after 10 seconds, but
it ignores the timeout function.

I'm compiling with -threaded, but it does not work either, I'm using ghc 6.12.2.

Does someone know what could be going wrong ?

Thanks !
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe