while resources.BLE_R.has_work() {
resources.BLE_R.process_one().unwrap();
}
This code can spin forever when the queue of outgoing packets is full and doesn't get drained asynchronously.
Responder should probably get a method process_all() that takes this into account. We also have to ensure that the BLE worker gets rescheduled when a packet gets dequeued from the TX queue, not just when one gets enqueued into the RX queue.
The example uses code like this:
This code can spin forever when the queue of outgoing packets is full and doesn't get drained asynchronously.
Responder
should probably get a methodprocess_all()
that takes this into account. We also have to ensure that the BLE worker gets rescheduled when a packet gets dequeued from the TX queue, not just when one gets enqueued into the RX queue.