-
Notifications
You must be signed in to change notification settings - Fork 55
Description
The above 3 methods are present on the AsyncHandler as a means of a micro-optimization, where if e.g. the handler declares that it does not do any async IO during a read operation, the Data Model can take advantage of that and not allocate a separate data buffer for the RX data coming from the peer (the "give me those attributes" request).
However, the above does not work if there is a need to do chunking of the reply, and we can't know if we should do chunking until we get to the chunking point!
At that time, we have to send the first message chunk, which means we have to remove our RX data from the Exchange buffer and move it to an IM buffer (as we are iterating over it for that and the following chunks), or else we cannot send the message!
However this is difficult to express in Rust in a clean way. For that reason, #291 no longer takes advantage of these methods, or else the code becomes much more complex.
Still - we should either re-introduce this micro-optimization, or we should get rid of those methods in the mid to long term.