sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Try to meld RequestEventDispatcher into RequestOnConn #183

Open gavin-norman-sociomantic opened 6 years ago

gavin-norman-sociomantic commented 6 years ago

The current separation leads to an extra layer of indirection: the connection fiber resumes the request-on-conn fiber which then resumes one of the request's fibers.

If the RequestEventDispatcher functionality was melded into RequestOnConn, one level of fiber suspend/resume could be done away with.

We'd probably need a method of RequestOnConn to acquire additional fibers and register them with the connection.

gavin-norman-sociomantic commented 6 years ago

We'd probably need a method of RequestOnConn to acquire additional fibers and register them with the connection.

Ha, a bit like what we have now for acquiring multiple request-on-conns per request: #192.