wpilibsuite/wpilib-docs

Add documentation for multi-tasking/Notifier

Aberta

#1.940 aberto em 25 de out. de 2022

 (0 comentário) (0 reação) (0 responsável)JavaScript (297 forks)auto 404
AdditionHelp Wanted

Métricas do repositório

Stars
 (187 estrelas)
Métricas de merge de PR
 (Mesclagem média 7d 6h) (14 fundiu PRs em 30d)

Description

There is no documentation for how to use Notifier on the docs site. It would also be helpful to provide guidance on when threads/Notifier may be appropriate vs. .addPeriodic(). Peter Johnson's response on this thread on CD provides some good guidance.

There is a Scheduling Functions at Custom Frequencies page, but it only mentions that you do not need to use Notifier. It also doesn't point out that addPeriodic() is cooperative (on the main thread) where Notifier run on its own thread so it will not block the main robot loop.

Guia do colaborador