Bug 578907 - null ISchedulingRule does not interrupt autobuild
Summary: null ISchedulingRule does not interrupt autobuild
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.23   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-22 11:19 EST by Jörg Kubitz CLA
Modified: 2022-02-22 11:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2022-02-22 11:19:47 EST
..but tries to lock.acquire() in WorkManager.checkIn()

In for example bug 546828 the workaround was to not use a null rule. But it should be more consistent for all operations: 
for rule null we could either
a) do not lock workspace
b) interrupt autobuild

variant b) seems to be less intrusive, but the javadoc of
Workspace.prepareOperation() clearly states:
"*If* a scheduling rule is supplied, this method will block until it is safe to run."

so according to that description a null rule should not block. But who knows how that is used for ~ 20 years.

For example SaveManager.addParticipant() clearly expects mutal exclusion by using a null rule.

proposal: b) + fix javadoc
Comment 1 Jörg Kubitz CLA 2022-02-22 11:22:57 EST
affects also the API IWorkspace.run()

"If no scheduling rule is supplied, there are no scheduling restrictions for this operation."