Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
5893333a
Commit
5893333a
authored
17 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
Fix: ensure the LazyPathHandler is kept running when an unexpected exception occurs
SVN: 1687
parent
4a263b2c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datamover/source/java/ch/systemsx/cisd/datamover/utils/LazyPathHandler.java
+17
-10
17 additions, 10 deletions
...ava/ch/systemsx/cisd/datamover/utils/LazyPathHandler.java
with
17 additions
and
10 deletions
datamover/source/java/ch/systemsx/cisd/datamover/utils/LazyPathHandler.java
+
17
−
10
View file @
5893333a
...
...
@@ -73,21 +73,28 @@ public class LazyPathHandler implements ITerminable, IPathHandler
@Override
public
void
run
()
{
while
(
terminate
==
false
)
try
{
try
while
(
terminate
==
false
)
{
File
resource
=
queue
.
take
();
// blocks if emp
ty
boolean
ok
=
handler
.
handle
(
resource
);
logHandlingResult
(
resource
,
ok
);
}
catch
(
InterruptedException
ex
)
{
if
(!
terminate
)
t
r
y
{
File
resource
=
queue
.
take
();
// blocks if empty
boolean
ok
=
handler
.
handle
(
resource
);
logHandlingResult
(
resource
,
ok
);
}
catch
(
InterruptedException
ex
)
{
operationLog
.
info
(
"Processing was unexpectedly interrupted. Thread stops."
);
if
(!
terminate
)
{
operationLog
.
info
(
"Processing was unexpectedly interrupted. Thread stops."
);
}
return
;
}
return
;
}
}
catch
(
Exception
ex
)
{
// Just log it but ensure that the thread won't die.
notificationLog
.
error
(
"An exception has occurred. (thread still running)"
,
ex
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment