Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344949

Summary: Need a way to get the most recently acquired ISchedulingRule
Product: [Eclipse Project] Platform Reporter: James Blackburn <jamesblackburn+eclipse>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug

Description James Blackburn CLA 2011-05-06 07:11:43 EDT
While writing a test, I wanted to release the rules currently held so another thread could proceed.  I mis-read the documentation on currentRule(): 

* Otherwise, this method will return the first scheduling rule obtained by this 
* thread via {@link #beginRule(ISchedulingRule, IProgressMonitor)} that has not
* yet had a corresponding call to {@link #endRule(ISchedulingRule)}.

I interpreted first as most recently begun non-ended rule, rather than the outermost beginRule.

Without API to do this, there seems to be no way to write a test which relinquishes all the rules in the rule stack, in the correct order.   In my case, the full set of rules is implementation defined, and I don't want to modify the test if the rule stack changes...
Comment 1 Eclipse Genie CLA 2019-09-21 14:42:53 EDT
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.

--
The automated Eclipse Genie.