Closed ypujante closed 1 year ago
Right on both points! Thanks for spotting the first issue.
The second issue is already on my todo list.
Do you think these fancy GitHub discussions would be a good place to put that list?
I think I can get this done during or before the weekend. There's no reason this should be hard.
I have never used the discussion section, so I don't really have any opinion. There is also a wiki section which might be more appropriate for a to-do list, maybe?
Check out the next
branch. Let me know if it works for you.
Thank you for taking my comments into consideration. After looking more into it, I don't think I can use your library for my project as I need to be able to have multiple watchers. The way you have implemented die
as a static
function that sets a static
variable guarantees that there can only be one watcher at a time. There is nothing wrong with this approach, but it just won't work for my particular use case.
I'll close this as completed when the next branch is merged. I may make a new issue in the future to support several watchers.
Thank you for the library. I have a one comment:
static
as you cannot create multiple watchers (the fact that it is an inline function does not change the nature of thestatic
variable)https://github.com/e-dant/watcher/blob/release/sinclude/watcher/watcher.hpp#L838
You can simply pass the hook in the lambda: