Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent read/writing of T_O_IOData/O_T_IOData #1

Open
twoudsma opened this issue Apr 11, 2018 · 0 comments
Open

Concurrent read/writing of T_O_IOData/O_T_IOData #1

twoudsma opened this issue Apr 11, 2018 · 0 comments

Comments

@twoudsma
Copy link

Hey!

Is there any plan to make the read/writing of T_O_IOData/O_T_IOData thread-safe? This is not an issue when reading separate bytes, but the Ethernet/IP device I am using also defines Int32 variables (4 bytes). When reading the T_O_IOData array, it might contain both bytes from the previous cycle and the current one resulting in an Int32 that was not actually on the device. The same issue can occur for the output O_T_IOData.

Accessing the T_O_IOData and O_T_IOData arrays through a property with a lock can solve this issue. Also an Array.Copy is probably faster than looping over the elements.

@twoudsma twoudsma changed the title Concurrent read/writing of T_O_IOData Concurrent read/writing of T_O_IOData/O_T_IOData Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant