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
d9fbc75b
Commit
d9fbc75b
authored
9 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
prepared DynamicActuator
parent
944c0c85
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/DynamicActuator.java
+11
-2
11 additions, 2 deletions
src/main/java/teetime/framework/DynamicActuator.java
src/main/java/teetime/util/framework/concurrent/SignalingCounter.java
+5
-0
5 additions, 0 deletions
...a/teetime/util/framework/concurrent/SignalingCounter.java
with
16 additions
and
2 deletions
src/main/java/teetime/framework/DynamicActuator.java
+
11
−
2
View file @
d9fbc75b
...
...
@@ -15,6 +15,7 @@
*/
package
teetime.framework
;
import
teetime.util.framework.concurrent.SignalingCounter
;
public
class
DynamicActuator
{
...
...
@@ -30,10 +31,14 @@ public class DynamicActuator {
}
public
Runnable
startWithinNewThread
(
final
Stage
previousStage
,
final
Stage
stage
)
{
//
SignalingCounter runtimeCounter = previousStage.owningContext.getThreadService().getRunnableCounter();
//
SignalingCounter newCounter = stage.owningContext.getThreadService().getRunnableCounter();
SignalingCounter
runtimeCounter
=
previousStage
.
owningContext
.
getThreadService
().
getRunnableCounter
();
SignalingCounter
newCounter
=
stage
.
owningContext
.
getThreadService
().
getRunnableCounter
();
// runtimeCounter.inc(newCounter);
// stage.logger.error(stage.owningContext.getThreadService().getRunnableCounter().toString());
// !!! stage.owningContext = XXX.owningContext !!!
Runnable
runnable
=
wrap
(
stage
);
Thread
thread
=
new
Thread
(
runnable
);
...
...
@@ -42,6 +47,10 @@ public class DynamicActuator {
thread
.
start
();
// requirements:
// 1. all new threads from stage must be known to the global context
// 2. number of active threads must be increased by the stage
if
(
runnable
instanceof
RunnableConsumerStage
)
{
// do nothing
}
else
if
(
runnable
instanceof
RunnableProducerStage
)
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/teetime/util/framework/concurrent/SignalingCounter.java
+
5
−
0
View file @
d9fbc75b
...
...
@@ -65,4 +65,9 @@ public class SignalingCounter {
counter
+=
otherCounter
.
counter
;
conditionalNotifyAll
(
counter
);
}
@Override
public
String
toString
()
{
return
"counter: "
+
counter
+
", "
+
super
.
toString
();
}
}
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