Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
sasa
Commits
7c662175
Commit
7c662175
authored
3 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Fix: the rdbgui4sasa was not quite rigth. Now it seems to work.
parent
7df6d8e0
No related branches found
No related tags found
No related merge requests found
Pipeline
#66614
passed
3 years ago
Stage: build
Stage: release
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/rdbg4sasa/gtkgui.ml
+12
-8
12 additions, 8 deletions
tools/rdbg4sasa/gtkgui.ml
with
12 additions
and
8 deletions
tools/rdbg4sasa/gtkgui.ml
+
12
−
8
View file @
7c662175
(* Time-stamp: <modified the 0
7
/05/2021 (at 1
7:28
) by Erwan Jahier> *)
(* Time-stamp: <modified the 0
8
/05/2021 (at 1
0:33
) by Erwan Jahier> *)
#
thread
#
require
"lablgtk3"
...
...
@@ -49,7 +49,7 @@ let rdbg_nodes_enabled e =
((
node
,
enab
)
,
[]
)
l
in
List
.
rev
(
last
::
res
)
last
::
res
type
daemon_kind
=
Distributed
|
Synchronous
|
Central
|
LocCentral
|
ManualCentral
|
Manual
...
...
@@ -310,21 +310,26 @@ let custom_daemon p gtext vbox step_button round_button =
aux
0
[]
nl
in
let
step
()
=
let
ne
=
if
!
e
.
kind
<>
Exit
&&
!
e
.
lang
<>
"sasa"
then
next_cond
!
e
(
fun
e
->
e
.
kind
=
Exit
&&
e
.
lang
=
"sasa"
)
else
!
e
in
e
:=
ne
;
let
nodes_enabled
=
rdbg_nodes_enabled
!
e
in
let
nodes
=
List
.
filter
(
fun
(
_
,
b
)
->
b
)
nodes_enabled
in
let
nodes
=
get_higher_prioriry
nodes
in
(* p ("==> gtkgui: CALL =" ^ (string_of_event !e)); *)
match
!
daemon_kind
with
|
Distributed
->
let
nodes
=
List
.
map
(
fun
x
->
[
x
])
nodes
in
let
to_activate
=
Daemon
.
distributed
nodes
in
Hashtbl
.
clear
daemongui_activate
;
List
.
iter
(
fun
n
->
Hashtbl
.
replace
daemongui_activate
n
true
)
to_activate
;
s
d
()
;
e
:=
next_cond
!
e
(
fun
e
->
e
.
kind
=
Ltop
);
d
()
;
p
(
"Distributed step : "
^
(
String
.
concat
","
to_activate
))
|
Synchronous
->
(
Hashtbl
.
clear
daemongui_activate
;
List
.
iter
(
fun
n
->
Hashtbl
.
replace
daemongui_activate
n
true
)
nodes
;
sd
()
;
e
:=
next_cond
!
e
(
fun
e
->
e
.
kind
=
Ltop
);
d
()
;
p
(
"==> gtkgui: EXIT ="
^
(
string_of_event
!
e
));
p
(
"Synchronous step : "
^
(
String
.
concat
","
nodes
))
)
|
Central
->
...
...
@@ -332,7 +337,7 @@ let custom_daemon p gtext vbox step_button round_button =
let
to_activate
=
Daemon
.
central
nodes
in
Hashtbl
.
clear
daemongui_activate
;
List
.
iter
(
fun
n
->
Hashtbl
.
replace
daemongui_activate
n
true
)
to_activate
;
s
d
()
;
e
:=
next_cond
!
e
(
fun
e
->
e
.
kind
=
Ltop
);
d
()
;
p
(
"Central step : "
^
(
String
.
concat
","
to_activate
))
|
LocCentral
->
...
...
@@ -347,11 +352,11 @@ let custom_daemon p gtext vbox step_button round_button =
let
to_activate
=
Daemon
.
locally_central
nodes
in
Hashtbl
.
clear
daemongui_activate
;
List
.
iter
(
fun
n
->
Hashtbl
.
replace
daemongui_activate
n
true
)
to_activate
;
s
d
()
;
e
:=
next_cond
!
e
(
fun
e
->
e
.
kind
=
Ltop
);
d
()
;
p
"Locally central step: finish me"
|
ManualCentral
->
()
(* SNO *)
|
Manual
->
s
d
()
|
Manual
->
e
:=
next_cond
!
e
(
fun
e
->
e
.
kind
=
Ltop
);
d
()
in
step
...
...
@@ -390,7 +395,6 @@ let main () =
in
let
p
str
=
text_out
#
set_buffer
(
GText
.
buffer
~
text
:
str
()
);
Printf
.
fprintf
oc_stdin
"%s
\n
%!"
str
;
Printf
.
printf
"%s
\n
%!"
str
;
in
(* It should be better to rely on the gtk event handler
...
...
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