[Tarantool-patches] [PATCH 2/6] raft: factor out the code to wakeup worker fiber
Cyrill Gorcunov
gorcunov at gmail.com
Wed Oct 14 16:29:39 MSK 2020
On Wed, Oct 14, 2020 at 01:28:28AM +0200, Vladislav Shpilevoy wrote:
> -raft_schedule_broadcast(void)
> +raft_worker_wakeup(void)
> {
> - raft.is_broadcast_scheduled = true;
> + if (raft.worker == NULL) {
> + raft.worker = fiber_new("raft_worker", raft_worker_f);
> + fiber_set_joinable(raft.worker, true);
> + }
When fiber_new return NULL you'll get nil dereference in fiber_set_joinable.
More information about the Tarantool-patches
mailing list