lxi-tools / liblxi

Open source LXI library
https://lxi-tools.github.io
Other
103 stars 27 forks source link

Fixed missing VXI11 connect-abort multithreading synchronization #26

Closed holzachr closed 2 years ago

holzachr commented 2 years ago

The end user might expect the lxi_connect() call to return synchronously; however, the separate connection thread may still be alive although already cancelled when the user calls lxi_connect() again. pthread_cancel()'ing the child thread sends a termination signal, which is handled by the child. The parent should wait for the child to be fully terminated before returning. This does not notably block the call, but avoids creating more and more child threads when retrying to connect.

lundmar commented 2 years ago

Thanks for your fixes. I plan to update lxi-tools soon and then I will also make a new release of liblxi.