We currently need an additional request to prepare zero-copy shared memory messages. For small messages, it might be faster to avoid this extra round-trip and send the message directly over TCP. This commit implements support for this. Messages smaller than a threshold (currently set to 4096 bytes) are sent via TCP, while larger messages still use shared memory.
This step also enables future optimizations such as queueing output messages in order to improve the throughput.
These two messages can be essential for correctness. For example, a node might not finish properly when an `InputClosed` event is lost. So we need to always send them, even if the target node was not subscribed yet when the event occurred.
Fixes a deadlock issue when the `incoming` channel is closed first. The problem was that the `send_out_buf` was set to `Fuse::terminated` without breaking the loop, so on the next loop iteration both futures were already terminated.
Without joining the thread it is killed suddenly by the OS when the executable exits. This causes interrupted connections to the daemon, which leads to some errors in the log messages. This commit fixes this by joining the event stream thread again, with the following improvements:
- Instead of joining the thread directly on drop, we now do the joining in a second thread and report the join result over a channel. This allows us to use a timeout when waiting for the join result in the drop implementation, so that we don't block indefinitely.
- We now share the ownership of the join handle between the node and the event stream. This way, its drop handler is only run after both instances were dropped. This way we avoid the deadlock that happened when joining the event steam thread before the event stream instance was dropped.
It is not guaranteed that the `EventStream` is dropped before the `DoraNode`. If it is dropped later on the same thread, this `join` leads to a deadlock.
* Update issue templates
Those issue template will help us have better issues and feature requests.
* Add better reproduce template and version check of dora