[Haskell-cafe] Parallel + exceptions

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Jun 23 12:28:13 EDT 2007

Hello Andrew,

Saturday, June 23, 2007, 7:12:52 PM, you wrote:

> Is everything described in that paper actually implemented now? (And
> implemented in exactly the same way as the paper says?)

difference may be in subtle details. it just works for me :)

>> in my experience, exceptions are rarely required in Haskell program -
>> i use them only to roll out when IO problems occur.

> Indeed. Somebody else mentioned Maybe; much cleaner, more intuitive 
> solution.

for me Maybe works great for exclusion of failed items (file not
found, etc) while exceptions are used to transfer control over the
many calling levels when we need to abort large piece of computation

> It's nice that you can have millions of threads if you want to do
> something very "concurrent". What I tend to want is "parallel" - doing
> stuff that *could* be done in a single thread, but I want it to go 
> faster using my big mighty multicore box.

this isn't completely different things. threads' easy of use means
that you can split your algorithm into parallel tasks here and there,
improving CPU utilization

> As I understand it, you have
> to do something "special" to make that happen...?

my own program spend most of its time in C threads, so i can't make
exact answer to your query. afair, you need to use -threaded when
compiling program, "+RTS -N2" for 2-core box when you run it - that's
all. ask me if you need C threads too

> While we're on the subject... has anybody ever looked at using muptiple
> processors on *networked* machines? Haskell's very pure semantics would
> seem quite well-suited to this...

i'm not sure, but this may be what you are looking for:

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list