You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since gpio.open acts like a Factory pattern for a discrete number of pins, there's no reason why we shouldn't store the GPIOPin instances internally. The benefit is that gpio.close will get all the benefit of contextually closing from the instance (port.close) like killing the filewatcher or whatever else we may add in the future.
The other benefit is if a user happens to open a port that has already been opened, then we can return the GPIOPin instance immediately without trying to close and reopen.
The text was updated successfully, but these errors were encountered:
Since gpio.open acts like a Factory pattern for a discrete number of pins, there's no reason why we shouldn't store the GPIOPin instances internally. The benefit is that gpio.close will get all the benefit of contextually closing from the instance (port.close) like killing the filewatcher or whatever else we may add in the future.
The other benefit is if a user happens to open a port that has already been opened, then we can return the GPIOPin instance immediately without trying to close and reopen.
The text was updated successfully, but these errors were encountered: