Skip to content

document setTimeout guarantees #186

@aycanirican

Description

@aycanirican

Consider this simple handler:

fooHandler :: Snap ()
fooHandler = do
  setTimeout 1
  liftIO $ threadDelay $ 3*1000*1000
  writeBS "Foo called"

We expect this handler throws an exception since we set 1 second timeout, our computation takes at least 3 seconds.

But it doesn't. It often throws exception, most of the time writes "Foo called" message.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions