Closed japaric closed 7 years ago
Looks good so far! :)
@homunkulus r+
:pushpin: Commit 1eb58e5 has been approved by japaric
:hourglass: Testing commit 1eb58e5 with merge 1eb58e5...
:sunny: Test successful - status-travis Approved by: japaric Pushing 1eb58e50cc9a0021f6bb088de0bcbe8948d36cc7 to master...
updated some examples to use the safe API implemented in japaric/particle-hal#10. I also have an idea to make global variable safe but haven't implemented it. The basic idea is that since there doesn't seem to be a mechanism for preemption then accessing global variables is safe as long as you don't hand out more than one mutable reference (
&mut-
) to the variable at a time and the simplest way to preserve that rule is that is to only hand out shared (&-
) references to global data. (Mutation through shared references can be achieved using Cell / RefCell).cc @dbrgn