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
There is quite a bit of error handling code required by the fact that users may ctrl+c when copying an image, which causes the user lock to never be released. This is tough to understand and prone to errors.
In other projects I've switched to using a wrapping handle class that implements RAII (lock in constructors, unlock in destructor), which can guarantee that the lock is always released once it's out of scope, i.e., when exiting the getsnapshot function (for any reason). HebiCam should switch over as well.
The text was updated successfully, but these errors were encountered:
There is quite a bit of error handling code required by the fact that users may ctrl+c when copying an image, which causes the user lock to never be released. This is tough to understand and prone to errors.
In other projects I've switched to using a wrapping handle class that implements RAII (lock in constructors, unlock in destructor), which can guarantee that the lock is always released once it's out of scope, i.e., when exiting the getsnapshot function (for any reason). HebiCam should switch over as well.
The text was updated successfully, but these errors were encountered: