Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
107442a4
Commit
107442a4
authored
9 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
refactored configureThread to return a Thread
parent
6f8a8aab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/framework/Analysis.java
+7
-11
7 additions, 11 deletions
src/main/java/teetime/framework/Analysis.java
src/site/markdown/wiki
+1
-1
1 addition, 1 deletion
src/site/markdown/wiki
with
8 additions
and
12 deletions
src/main/java/teetime/framework/Analysis.java
+
7
−
11
View file @
107442a4
...
...
@@ -136,27 +136,21 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
newListener
=
factory
.
create
();
switch
(
stage
.
getTerminationStrategy
())
{
case
BY_SIGNAL:
{
final
RunnableConsumerStage
runnable
ConsumerStage
=
new
RunnableConsumerStage
(
stage
);
final
Thread
thread
=
new
Thread
(
runnableConsumerStag
e
);
final
RunnableConsumerStage
runnable
=
new
RunnableConsumerStage
(
stage
);
final
Thread
thread
=
create
Thread
(
newListener
,
intraStages
,
stage
,
runnabl
e
);
this
.
consumerThreads
.
add
(
thread
);
configureThread
(
newListener
,
intraStages
,
stage
,
thread
);
break
;
}
case
BY_SELF_DECISION:
{
final
RunnableProducerStage
runnable
=
new
RunnableProducerStage
(
stage
);
final
Thread
thread
=
new
Thread
(
runnable
);
final
Thread
thread
=
create
Thread
(
newListener
,
intraStages
,
stage
,
runnable
);
this
.
finiteProducerThreads
.
add
(
thread
);
configureThread
(
newListener
,
intraStages
,
stage
,
thread
);
break
;
}
case
BY_INTERRUPT:
{
final
RunnableProducerStage
runnable
=
new
RunnableProducerStage
(
stage
);
final
Thread
thread
=
new
Thread
(
runnable
);
final
Thread
thread
=
create
Thread
(
newListener
,
intraStages
,
stage
,
runnable
);
this
.
infiniteProducerThreads
.
add
(
thread
);
configureThread
(
newListener
,
intraStages
,
stage
,
thread
);
break
;
}
default
:
...
...
@@ -166,7 +160,8 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
}
private
void
configureThread
(
final
AbstractExceptionListener
newListener
,
final
Set
<
Stage
>
intraStages
,
final
Stage
stage
,
final
Thread
thread
)
{
private
Thread
createThread
(
final
AbstractExceptionListener
newListener
,
final
Set
<
Stage
>
intraStages
,
final
Stage
stage
,
final
AbstractRunnableStage
runnable
)
{
final
Thread
thread
=
new
Thread
(
runnable
);
stage
.
setExceptionHandler
(
newListener
);
for
(
Stage
intraStage
:
intraStages
)
{
intraStage
.
setOwningThread
(
thread
);
...
...
@@ -174,6 +169,7 @@ public final class Analysis<T extends AnalysisConfiguration> implements Uncaught
}
thread
.
setUncaughtExceptionHandler
(
this
);
thread
.
setName
(
stage
.
getId
());
return
thread
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
wiki
@
162510ff
Subproject commit
0e4474577e1f49bc96e734c286b2d9e0363895e
8
Subproject commit
162510ff4d2f04011498ba6920aae0c78347c6c
8
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