Closed nicolatimeus closed 1 year ago
In the current implementation AmsRouter::AddRoute performs a connect() call holding the global lock https://github.com/Beckhoff/ADS/blob/0499e45c49e530133ee8386eabbed1da9eebaf18/AdsLib/standalone/AmsRouter.cpp#L54. This blocks all operations on all routes until the connection attempt finishes, this can be undesirable if the connect call takes a long time to complete (for example if a timeout occurs), causing issue #208.
AmsRouter::AddRoute
connect()
This PR implements a more fine-grained locking approach that allows operations on different routes to be performed concurrently, operations on the same route should behave in the same way as the current version.
Closes #208
was merged as https://github.com/Beckhoff/ADS/commit/8e8fb2a9acff06cc617f351ea35dbb9e56f0cf97
In the current implementation
AmsRouter::AddRoute
performs aconnect()
call holding the global lock https://github.com/Beckhoff/ADS/blob/0499e45c49e530133ee8386eabbed1da9eebaf18/AdsLib/standalone/AmsRouter.cpp#L54. This blocks all operations on all routes until the connection attempt finishes, this can be undesirable if the connect call takes a long time to complete (for example if a timeout occurs), causing issue #208.This PR implements a more fine-grained locking approach that allows operations on different routes to be performed concurrently, operations on the same route should behave in the same way as the current version.
Closes #208