Closed facundominguez closed 9 years ago
Basically this change is making send strict for all connections, is that true?
send
is strict for all connections to other endpoints. This patch is making it strict for the same endpoint as well.
I can think of two reasons to do it:
Before this change, one could crash the node controller of CH by calling:
DP.spawnAsync self (error "bang!")
which is going through the transport even for the local node.
If the sender gets the error, it is less puzzling.
This is part of connectToSelf
call that is called inside:
apiConnect params ourEndPoint theirAddress _reliability hints =
try . asyncWhenCancelled close $
if localAddress ourEndPoint == theirAddress
then connectToSelf ourEndPoint
so I'd say that this patch do not affect non-local connections in any way.
Yes, that's what I meant: it was already strict when sending to other endpoints, this patch makes it strict for same-endpoint too. Makes sense, although Tim had some "unsafe" primitives that explicitly were NOT strict when sending stuff to the same endpoint. I don't know if that is affected by this patch or not.
IIUC that part of functionality is not affected, because d-p
do not use network-transport
for local communication.
You may well be right, I don't remember :) But that sounds reasonable :) Mentioned it just in case.
@edsko while you are here could you also check #18 ?
@qnikst pointed that evaluate
is not contributing anything, so I shortened the patch.
https://cloud-haskell.atlassian.net/browse/NTTCP-11