How to stop a master?

Description

I followed the work stealing example frm the Well-Typed blog.

I did not use "terminateAllSlaves", so that I can repeatedly run my master "main" function and get slaves to do multiple rounds of work.

However, I cannot do the same from a single GHCi session.

It looks like "startMaster" can only be called once per GHCi, and successive calls block.

Is that correct? Why is that? How can I "stop" a master, so that I can use "startMaster" from GHCi multiple times?

Environment

None

Activity

Show:
Tim Watson
January 7, 2014, 12:09 PM

I'll probably look into it after the distributed-process 0.5.x series goes out in the next month or so.

Just a quick update. I will indeed be looking at this after the 0.5.x series is released, but as you can tell, that's been rather badly delayed.

Tim Watson
February 25, 2013, 9:21 AM

Still I would argue that simplelocalnet is super useful for local networks

Sure, and we will continue to support it and I will track this behaviour down and fix it (if there is something wrong) or suggest a workaround. It's just a bit lower down the priority list - I'll probably look into it after the distributed-process 0.5.x series goes out in the next month or so.

NiklasH
February 20, 2013, 12:09 AM

Thanks.

Still I would argue that simplelocalnet is super useful for local networks - as a Cloudhaskell user, I prefer working on the high level aspects, and prefer not to implement the UDP broadcasting myself.

Tim Watson
February 19, 2013, 7:35 PM

Is that correct? Why is that? How can I "stop" a master, so that I can use "startMaster" from GHCi multiple times?

I'm not really sure why this is, but I can take a look. There's nothing in startMaster that looks limited to running only once, unless the Backend needs to be stopped (e.g., the endpoint closed) - I'll look into that.

I should really point out that distributed-process-simplelocalnet is just a 'quick start' tool to get you going. For serious applications you'd want to use distributed-process-tcp instead, in which case the shutdown is a matter of choosing endpoints to close and shutting them down manually.

Assignee

Tim Watson

Reporter

NiklasH

Labels

None

External issue ID

None

OS

None

Affects versions

Priority

Trivial