Pi4J / pi4j-v1

DEPRECATED Java I/O library for Raspberry Pi (GPIO, I2C, SPI, UART)
http://www.pi4j.com
Apache License 2.0
1.31k stars 447 forks source link

add synchronized block to pins iteration #480

Closed ironman00023 closed 4 years ago

ironman00023 commented 4 years ago

As java docs says on Collections.synchronizedList(List list) "It is imperative that the user manually synchronize on the returned list when iterating over it".

eitch commented 4 years ago

Hi @ironman00023 nice catch! I've pushed this to my fork, where i have additional fixes for aarch64: https://github.com/eitch/pi4j/tree/develop/1.4