Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353074 - Clarify IJobChangeListener contract regarding error handling and threading
Summary: Clarify IJobChangeListener contract regarding error handling and threading
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.7   Edit
Hardware: All Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 02:35 EDT by Gunnar Wagenknecht CLA
Modified: 2019-11-14 03:18 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2011-07-26 02:35:41 EDT
It would be nice if IJobChangeListener can have more clarifying words regarding error handling and threading.

What happens if any of the IJobChangeListener throw a RuntimeException? 
- Will the listener get removed or will it continue to receive notifications? 
- Will the job still be executed or will it be aborted?

How are IJobChangeListener methods called?
- Inside or outside the same thread the calls Job#run?

The last topic is especially of interest for me. I'd like to implement a IJobChangeListener that in #running(IJobChangeEvent) sets some ThreadLocal and unsets it in #done(IJobChangeEvent event) (for example, Logback logging MDC). This works nicely currently. But it's not explicitly stated in the contract of IJobChangeListener if it works by accident of if my implementation can rely on the behavior.
Comment 1 Lars Vogel CLA 2019-11-14 03:18:47 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.