You might want to consider the difference between threads and processes — and that the latter are more or less impossible to get correct in the presence of multiple threads.

On Wed, Jul 17, 2019 at 10:03 AM Станислав Черничкин <schernichkin@gmail.com> wrote:
Benefits and use cases for strong mobility in presence of closure serialization

I read a paper about strong mobility in Haskell http://www.dcs.gla.ac.uk/~trinder/papers/strongm.pdf and I wondering what benefits it gives in presence of closure serialization? I guess for some languages strong mobility could be only way to transfer execution state of program, e.g.

[Mobile Pascal;)]
program Test;
var
  a: Integer;
begin
  readln(a);             // acquiring on current host
  moveTo("anotherHost"); // transfering state and terminating
  writeln(a);            // printing on another host
end.

but in Haskell same program can be written just using rfork :: Host -> IO () -> IO ():

main = do
  a <- readLn
  rfork AnotherHost $ do
    print a

The difference comparing to moveTo :: Host -> IO () version is purely syntactic:

main = do
  a <- readLn
  moveTo AnotherHost
  print a

--
Sincerely, Stanislav Chernichkin.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


--
brandon s allbery kf8nh
allbery.b@gmail.com