-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signal handler doesn't get called when signal is raised in a worker thread #1
Comments
Humm, weird, this should always work. What do you mean by "if it's a worker thread, it doesn't work" ? Are you calling the exact same native method from within Java code, protected by coffeecatch handlers ? (Typically in HTTrack on Android, the coffeecatch code is always used in a worker thread) |
Now that you've asked, I'm not sure if that's not just me being silly. I'll doublecheck that the method in question is actually called from within coffeecatch-protected section. I'll update you as soon as I figure it out. Thanks for a quick response and a great tool! |
You're right, that was my mistake, I didn't wrap all the native methods with COFFEE_TRY. |
Simply use coffeecatch_throw_exception(), or better, the COFFEE_TRY_JNI() macro:
|
That would be cool to use, but I need my own handler because I need to write to my own log. |
coffeecatch works great as long as the signal is raised on the main thread. But if it's a worker thread, it doesn't work. Is there a workaround?
The text was updated successfully, but these errors were encountered: