Closed al2389 closed 6 years ago
I can use goroutine, thanks.
Sounds like you might have figured it out.
If you need to use select
on multiple Go channels simultaneously, then watcher.Notification
is helpful since you can just receive from it directly. If you want to do 2 blocking things at the same time, you can select
result channels from both, and watcher.Notification
can be one of those channels.
watcher.Watch() is good, but it blocks the program execution. Is there a non-blocking way to catch the pin change events ?
Can watcher.Notification do this ? If yes, could you give me some example code ? I am very new to golang. Thanks.