[Haskell-cafe] Help with async library and killing child processes

YueCompl compl.yue at icloud.com
Wed Mar 18 09:10:19 UTC 2020


Idiomatic resource leakage prevention in short.

An app wants to be as responsive to its users as practically feasible, it would try multiple paths to load-balanced resources, and use the first response that come back, then cancel other paths. Cancellation can help reducing vain computation in such architectures, sometimes largely enough.

> On 2020-03-18, at 16:58, Branimir Maksimovic <branimir.maksimovic at gmail.com> wrote:
> 
> What's wrong with forkIO?
> 
> Greets,
> Branimir.
> 
> On 3/18/20 9:37 AM, YueCompl via Haskell-Cafe wrote:
>> If not for tight loops or other CPU intensive tasks, you may be interested in Edh, which introduces Go's goroutine to GHC runtime. But Edh threads add much higher overhead on top of GHC threads, so there's a price to pay for simplicity of end programmer's job.
>> 
>> It's briefly described at https://github.com/e-wrks/edh/tree/master/Tour#program--threading-model <https://github.com/e-wrks/edh/tree/master/Tour#program--threading-model> . This is very new and I'm right now actively working on it for PoC of an STM powered in-memory graph database implementation.
>> 
>> Best regards,
>> Compl
>> 
>>> On 2020-03-18, at 11:15, Niklas Hambüchen <mail at nh2.me <mailto:mail at nh2.me>> wrote:
>>> 
>>> I've you're new to async, also check out my recent rework of the docs that talk about this topic specifically:
>>> 
>>> https://github.com/simonmar/async/pull/105/files <https://github.com/simonmar/async/pull/105/files>
>>> 
>>> (To be available in the next release of async.)
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> To (un)subscribe, modify options or view archives go to:
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe <http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe>
>>> Only members subscribed via the mailman list are allowed to post.
>> 
>> 
>> 
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe <http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe>
>> Only members subscribed via the mailman list are allowed to post.
> _______________________________________________
> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200318/064a8863/attachment.html>


More information about the Haskell-Cafe mailing list