marigold-dev / marigold-dev/pollinate
Unnecessary sleep time in server
@rosalogia is already working on this.
Since Jun 3, 2022.
- Dominant language
- OCaml
- Stars
- 22
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Currently we require a 0.001 sleep time between server iterations due to the fact that we handle message reception/processing in a secondary thread. This means that the recursive function that acts as the server has nothing to wait for between runs, and thusly sort of spins out of control if there is no sleep time between recursive calls. This is not necessarily the correct design. The reason we handle message reception/processing in a secondary thread is because the server is responsible for triggering some other periodic behaviours such as dissemination and failure detection, and these must fire regularly even if a message is not received. The real solution is to make things like dissemination and failure detection asynchronous with `Lwt.async`, have the server wait for new messages, and handle message processing in a secondary thread.
RELATED PRs:
- [ ] #33
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.