XtextDocument should provide non-blocking API for reading/modifying a resource
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the XtextDocument API and the java.util.concurrent.locks.Lock tryLock() and timed tryLock(long, TimeUnit) patterns named in the issue. Define non-blocking read and modify methods, including tryReadOnly and the corresponding modify convenience method, with default values returned when a lock cannot be acquired.
Written by the indexing model from the issue text.
Description
XtextDocument should provide non-blocking methods for reading / modifying the resource.
-
This would require methods following the pattern of
java.util.concurrent.locks.Lock#tryLock()andjava.util.concurrent.locks.Lock.tryLock(long, TimeUnit)
(each for reading and modifying).
-
For convenience, additional methods as follows would be helpful:
/** * Like `#readOnly(IUnitOfWork)`, but won't block if a read-lock cannot be acquired * at this time; instead, the given default value will be returned in this case) */ public <T> T tryReadOnly(IUnitOfWork<T, XtextResource> work, T defaultValue) { ...(and for modify, accordingly).
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-xtext/xtext
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-xtext/xtext#3727 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eclipse-xtext/xtext#3668 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
eclipse-xtext/xtext#3797 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
eclipse-xtext/xtext#3796 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
eclipse-xtext/xtext#3795 · 1 comment ·
All issues in eclipse-xtext/xtext
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·