[Babel-users] [PATCH 2/3] Introduce taskqueue for easier tasks and timeout handling

Juliusz Chroboczek jch at irif.fr
Sat Dec 22 16:39:47 GMT 2018


Thanks for the code.

> The task queue allows to schedule tasks that happen in the future.

This implements a binary heap as a linked tree, which has very poor
locality.  In order to improve locality and avoid memory allocations, we
should be implementing the heap as an array.

An alternative would be to use the opportunity to make babeld
multithreaded by using work-stealing scheduler, but that might be
overkill.

I'd also like somebody to explain to me what are the tradeoffs between
a binary heap and the timer wheel.  I've used binary heaps (implemented as
arrays) since I was but a bairn, but I don't fully understand the timer
wheel.

-- Juliusz



More information about the Babel-users mailing list