Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344949 - Need a way to get the most recently acquired ISchedulingRule
Summary: Need a way to get the most recently acquired ISchedulingRule
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.7   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-runtime-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 07:11 EDT by James Blackburn CLA
Modified: 2019-09-21 14:42 EDT (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 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.