Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache reload asynchronous #10

Merged
merged 4 commits into from
Mar 2, 2013
Merged

Cache reload asynchronous #10

merged 4 commits into from
Mar 2, 2013

Conversation

dertseha
Copy link
Contributor

@dertseha dertseha commented Mar 1, 2013

The cache reload mechanism has been rebuilt to run asynchronously and update the editor upon completion. Queries for step candidates are always done against the last known cache.

Code changes:

  • Control over cache has been extracted from JBehaveProject to dedicated StepCandidateCacheLoader
  • Unit tests added for StepCandidateCacheLoader
  • ProcessGroup was dropped, MonitoredExecutor recreated instead; Code based on Executor interfaces.

This merge should handle #1 and #6.

- Cache is now not built when it is requested, but when something
changed
- Rebuild is done asynchronously, and only one at a time
- This first iteration is a first hack, no tests nor any proper
segmentation present.
- Dropped ProcessGroup and recreated MonitoredExecutor (test similar)
- All users of ProcessGroup.spawn() could be converted to Runnable
- Clarified thread separation of scan and completion in Loader
- Final benefit: Easier testing for StepCandidateCacheLoader
- added unit tests for StepCandidateCacheLoader
- Organized imports (removed unused ones)
- Moved static helper to place of usage
- Renamed variables and types for better meaning
maurotalevi added a commit that referenced this pull request Mar 2, 2013
@maurotalevi maurotalevi merged commit 7f582c6 into jbehave:master Mar 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants