The key problem is, at least in the presence of block/unblock, that
Exceptions are never reliably delivered.
Never? Even in a function which is in a blocking state?
The implementation of asynchronous signals, as described by the paper
Asynchronous exceptions in Haskell
Simon Marlow,
On 12/7/06, J. Garrett Morris [EMAIL PROTECTED] wrote:
foo :: ErrorT String IO Int
Since ErrorT String IO Int is not the same as IO, you can't use IO
operations directly. In this case, you want:
a - lift getLine
You want:
r - runErrorT foo
Wow! I found your help terrific!
On 12/7/06, Chris Kuklewicz [EMAIL PROTECTED] wrote:
Could you add info about where to get your code (or the code) itself to the wiki
at http://haskell.org/haskellwiki/Concurrency_demos/Graceful_exit ?
OK, I did.
unblock yield is the right code for a safepoint
Be careful. You are relying
I've read Jeff Newbern's tutorial on monad transformers
(http://www.nomaware.com/monads/html/index.html), but I don't grok it
yet and I can't tell how to get started with this particular
requirement, or even if I need monad transformers for this.
I have a program that performs a series of IO
And you just rediscovered monad transformers.
Can I use an existing monad transformer like ErrorT for this application?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 12/7/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Cat Dancer wrote:
I have a program that performs a series of IO operations, each which
can result in an error or a value. If a step returns a value I
usually want to pass that value on to the next step, if I get an error
I want to do
Chris Kuklewicz suggested I direct this question to the developers ^_^
If I use a network accept inside a block:
block (
...
(clientSocket, sockAddr) - accept serverSocket
...
)
and the 'accept' unblocks a pending asynchronous exception and the
exception gets thrown, does this
I have a prospective implementation of a network accept loop with
graceful shutdown.
This email builds upon the previous discussion Help needed
interrupting accepting a network connection.
In this code, just the accept loop part has been factored out and put
into its own module. My hope is
From the discussion of Help needed interrupting accepting a network
connection, what we have so far is:
* To break out of an accept call, an asynchronous exception is needed.
* The presence of asynchronous exceptions complicates the other code
used to report if accept completed or
On 12/5/06, Chris Kuklewicz [EMAIL PROTECTED] wrote:
Making small programs to test these properties is a good sanity check. For
instance I just leaned that safePoint = unblock ( return () ) does not work.
Maybe if you do something to allocate some memory inside of the unblock?
If this
I'd like to write a server accepting incoming network connections that
can be gracefully shutdown.
When the server is asked to shutdown, it should stop accepting new
connections, finish processing any current connections, and then
terminate.
Clients can retry if they attempt to make a
On 12/2/06, Chris Kuklewicz [EMAIL PROTECTED] wrote:
Hi, I have taken a crack at this. The best thing would be not to use the
asynchronous exceptions to signal the thread that calls accept.
I'd certainly be most happy not to use asynchronous exceptions as the
signalling mechanism, but how
12 matches
Mail list logo