Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
elixxir
client
Commits
a60bd10c
Commit
a60bd10c
authored
2 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Clean up documentation
parent
330a54cd
No related branches found
No related tags found
3 merge requests
!510
Release
,
!381
Initial CTIDH
,
!378
Add a debug GetRunningProcesses to bindings
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bindings/follow.go
+12
-2
12 additions, 2 deletions
bindings/follow.go
fileTransfer/manager.go
+2
-3
2 additions, 3 deletions
fileTransfer/manager.go
stoppable/multi.go
+3
-1
3 additions, 1 deletion
stoppable/multi.go
xxdk/cmix.go
+3
-2
3 additions, 2 deletions
xxdk/cmix.go
with
20 additions
and
8 deletions
bindings/follow.go
+
12
−
2
View file @
a60bd10c
...
@@ -136,8 +136,18 @@ func (c *Cmix) IsHealthy() bool {
...
@@ -136,8 +136,18 @@ func (c *Cmix) IsHealthy() bool {
return
c
.
api
.
GetCmix
()
.
IsHealthy
()
return
c
.
api
.
GetCmix
()
.
IsHealthy
()
}
}
// GetRunningProcesses returns the name of all running processes at the time
// GetRunningProcesses returns the names of all running processes at the time
// of this call.
// of this call. Note that this list may change and is subject to race
// conditions if multiple threads are in the process of starting or stopping.
//
// Returns:
// - []byte - A JSON marshalled list of all running processes.
//
// JSON Example:
// {
// "FileTransfer{BatchBuilderThread, FilePartSendingThread#0, FilePartSendingThread#1, FilePartSendingThread#2, FilePartSendingThread#3}",
// "MessageReception Worker 0"
// }
func
(
c
*
Cmix
)
GetRunningProcesses
()
([]
byte
,
error
)
{
func
(
c
*
Cmix
)
GetRunningProcesses
()
([]
byte
,
error
)
{
return
json
.
Marshal
(
c
.
api
.
GetRunningProcesses
())
return
json
.
Marshal
(
c
.
api
.
GetRunningProcesses
())
}
}
...
...
This diff is collapsed.
Click to expand it.
fileTransfer/manager.go
+
2
−
3
View file @
a60bd10c
...
@@ -219,8 +219,8 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
...
@@ -219,8 +219,8 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
batchBuilderStop
:=
stoppable
.
NewSingle
(
batchBuilderThreadStoppable
)
batchBuilderStop
:=
stoppable
.
NewSingle
(
batchBuilderThreadStoppable
)
// Start sending threads
// Start sending threads
// Note that the startSendingWorkerPool
creates go routines
for
o
ver
worker
// Note that the startSendingWorkerPool
already creates thread
for
e
ver
y
// As a result, there is no need to run it asynchronously. In fact,
//
worker.
As a result, there is no need to run it asynchronously. In fact,
// running this asynchronously could result in a race condition where
// running this asynchronously could result in a race condition where
// some worker threads are not added to senderPoolStop before that stoppable
// some worker threads are not added to senderPoolStop before that stoppable
// is added to the multiStoppable.
// is added to the multiStoppable.
...
@@ -229,7 +229,6 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
...
@@ -229,7 +229,6 @@ func (m *manager) StartProcesses() (stoppable.Stoppable, error) {
// Create a multi stoppable
// Create a multi stoppable
multiStoppable
:=
stoppable
.
NewMulti
(
fileTransferStoppable
)
multiStoppable
:=
stoppable
.
NewMulti
(
fileTransferStoppable
)
jww
.
DEBUG
.
Printf
(
"Adding sender pool w/ name %s"
,
senderPoolStop
.
Name
())
multiStoppable
.
Add
(
senderPoolStop
)
multiStoppable
.
Add
(
senderPoolStop
)
multiStoppable
.
Add
(
batchBuilderStop
)
multiStoppable
.
Add
(
batchBuilderStop
)
...
...
This diff is collapsed.
Click to expand it.
stoppable/multi.go
+
3
−
1
View file @
a60bd10c
...
@@ -76,7 +76,9 @@ func (m *Multi) GetStatus() Status {
...
@@ -76,7 +76,9 @@ func (m *Multi) GetStatus() Status {
return
lowestStatus
return
lowestStatus
}
}
// GetRunningProcesses returns a list of running Stoppable processes.
// GetRunningProcesses returns the names of all running processes at the time
// of this call. Note that this list may change and is subject to race
// conditions if multiple threads are in the process of starting or stopping.
func
(
m
*
Multi
)
GetRunningProcesses
()
[]
string
{
func
(
m
*
Multi
)
GetRunningProcesses
()
[]
string
{
m
.
mux
.
RLock
()
m
.
mux
.
RLock
()
...
...
This diff is collapsed.
Click to expand it.
xxdk/cmix.go
+
3
−
2
View file @
a60bd10c
...
@@ -397,8 +397,9 @@ func (c *Cmix) HasRunningProcessies() bool {
...
@@ -397,8 +397,9 @@ func (c *Cmix) HasRunningProcessies() bool {
return
!
c
.
followerServices
.
stoppable
.
IsStopped
()
return
!
c
.
followerServices
.
stoppable
.
IsStopped
()
}
}
// GetRunningProcesses returns the name of all running processes at the time
// GetRunningProcesses returns the names of all running processes at the time
// of this call.
// of this call. Note that this list may change and is subject to race
// conditions if multiple threads are in the process of starting or stopping.
func
(
c
*
Cmix
)
GetRunningProcesses
()
[]
string
{
func
(
c
*
Cmix
)
GetRunningProcesses
()
[]
string
{
return
c
.
followerServices
.
stoppable
.
GetRunningProcesses
()
return
c
.
followerServices
.
stoppable
.
GetRunningProcesses
()
}
}
...
...
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