I have built a library crate that uses ThreadHandle::join, and returns the error, if it fails (which is
Box<dyn Any + Send + 'static>>).
The problem is, eyre::Report and similar types require errors to be
The end result is, that the error of my library is painful to use with those craters (especially, if the error is deep within an error tree).
I'm wondering what the best solution for my library crate would be in this case.
For now, I have wrapped the error of
Arc<Mutex<_>>, which works. But I doubt this is the ideal solution.
Another option would be, to let the user of my crate do the above. However, as mentioned, this would kill ergonomics of handling the error.
I'm also wondering why
ThreadHandle::join isn't returning an error that's