-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Uncaught exception may not appear on console when main is waiting for a job #208
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
Comments
This is still happening on Code (same as the body of the issue)
Sample output:
|
Confirm. I've fixed the order in which invocations happen normally, but there is a problem in another place, too. |
Here is what I'm observing in this case:
|
Fixed in version |
It is no longer needed, because handleJobException covers #208
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Job.cancelChild(parent) is introduced as a dedicated method to send cancellation signal from parent to child. * Job.getCancellationException() now works in completing state, too, and it is used to get exception when parent's completion cancels children. * Child never aggregates exception received from it parent. * JobSupport.handleJobException() for launch/actor is split into: - cancelParentWithException - can be invoked multiple times on race; - handleJobException which - invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code.
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
* Removed legacy onFinishing handler support from JobSupport. - It is no longer needed, because handleJobException covers #208 * Fixed bugs that were masked by cancelling parent from onFinishing. * Consistent "Finishing" state was introduced in internal machinery: - Job enters finishing state when it is failing or it is completing and has children - Finishing state cleanly aggregates all failures, tracks cancellation and completion status * Job.isFailed is introduced as a consistent way to query the "failing" state of the job that was previously only implicitly available via invokeOnCompletion handler (cause != null means a failed job) and the documentation for both Job & Deferred is updated to reflect that. * Source-incompatible change: Job.invokeOnCompletion boolean parameter is change to onFailing. Such handlers are now invoked as soon as the job starts failing and the root cause exception of the failure is consistently passed to all the handlers. * The following internal methods were introduced to facilitate this: - Job.failParent(exception) is used by child to signal failure to parent - Job.cancelChild(parentJob) is used by parent to cancel child. * Child never aggregates exception received from it parent, but uses it as it root cause if there is no other exception. * JobSupport.handleJobException() logic for launch/actor is split into: - failParent - can be invoked multiple times on race; - handleJobException which is invoked exactly once. * Exception materiazization is much lazier now, which should significantly improve performance when cancelling large hierarchies. * Other minor perf improvements in JobSupport code. Fixes #585
Consider the following code:
Because of the order events are handled internally,
main
can wake up and terminate application before exception handler had a chance to print onto the console from its background thread.Consider handling uncaught exceptions in
launch
before everything else.The text was updated successfully, but these errors were encountered: