copperspice / cs_libguarded

Header-only library for multithreaded programming
https://www.copperspice.com/
Other
226 stars 27 forks source link

added return value to ordered_guarded::modify #7

Closed ericLemanissier closed 6 years ago

ericLemanissier commented 6 years ago

It simply forwards the return value of the callable to the caller of modify There is no impact for callables returning void

agserm commented 6 years ago

Will look at merging this and #6 next week. Thanks for the contribution!

agserm commented 6 years ago

I really like this idea, and thanks for bringing it up. I did encounter some issues with lambdas returning void in my test environment. I have committed an alternate implementation in b610807, please let me know if that works for your use case.