Am 26.06.2013 18:39, schrieb Nick Sabalausky:

Perhaps I'm just being paranoid, but:

Regarding the new system where a fiber's ownership of a socket is
handled implicitly: Am I correct in assuming that still guarantees
that two fibers cannot try to read/write the same socket and end up
corrupting the protocol? There's nothing new I have to do to prevent
such a problem, right? One fiber can't end up implicitly "stealing"
ownership from another fiber?

It will still trigger an assertion when they actually try to write at
the same time. However, nothing stops another task to write something
in-between two write operations of another task now. This was the
place where the explicit ownership had an additional safety net.

However, anything controlled by the connection pool is still safe and
now like back then, some kind of (e.g. mutex based) synchronization is
needed to protect from this kind of error anyway. Just that some errors
will now go undetected.

But I think this is still the right choice. The ideal goal is probably
to end up with the same semantics as blocking I/O (i.e. letting another
task block until the write operation of another task on the same
connection has finished).