About Async API in distributed-process

10 views
Skip to first unread message

Alexander Vershilov

unread,
Dec 9, 2014, 10:20:13 AM12/9/14
to distribut...@googlegroups.com
Hi Tim,

After discussing the monad-control instance pull request, I have
rechecked distributed-process-platform API. The fact that we have too
different interfaces still worries me.
After reading documentation and code I still don't understand cases that
can be expressed using Async-Chan API, but can't be expressed
using Async-STM API. The only missing methods were *Cancel
(waitAnyCancel, waitCancelTimeout). Is there any fundamental problem
in implementing those? Are there any other cases where Async-Chan
is better then Async-STM?

--
Alexander.

Tim Watson

unread,
Dec 10, 2014, 4:32:34 AM12/10/14
to Alexander Vershilov, distribut...@googlegroups.com
Hi Alexander,

I don't think there is a fundamental problem implementing waitCancelTimeout (waitAnyCancel is implemented for both APIs?) and I suspect we can collapse the implementation into just one interface now if we wish. The only real difference is in the implementation details and I strongly suspect that the STM based implementation is more efficient anyway. I originally wrote the channels based one and then re-implemented using STM to avoid the limitation that the async handle is usable only by its creating process.

I'm just in the process of splitting up distributed-process-platform into smaller libraries, so the distributed-process-async library will include just one top level API - the STM based one.

Cheers,
Tim   

--
You received this message because you are subscribed to the Google Groups "Distributed Haskell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distributed-has...@googlegroups.com.
To post to this group, send email to distribut...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/distributed-haskell/ce01d4e1-bb1b-4be3-b58e-793ce67b735a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages