Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
2f12f18c
Commit
2f12f18c
authored
6 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[fix] core: 3rd module never launched
parent
a68036fd
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/core/core/lib.rs
+1
-1
1 addition, 1 deletion
lib/core/core/lib.rs
lib/core/core/router.rs
+14
-13
14 additions, 13 deletions
lib/core/core/router.rs
with
15 additions
and
14 deletions
lib/core/core/lib.rs
+
1
−
1
View file @
2f12f18c
...
...
@@ -56,7 +56,7 @@ use structopt::StructOpt;
use
threadpool
::
ThreadPool
;
/// Number of thread in plugins ThreadPool
pub
static
THREAD_POOL_SIZE
:
&
'static
usize
=
&
2
;
pub
static
THREAD_POOL_SIZE
:
&
'static
usize
=
&
4
;
#[macro_export]
macro_rules!
durs_core_server
{
...
...
This diff is collapsed.
Click to expand it.
lib/core/core/router.rs
+
14
−
13
View file @
2f12f18c
...
...
@@ -231,6 +231,7 @@ fn send_msg_to_several_receivers(
receivers
:
&
[
ModuleStaticName
],
modules_senders
:
&
HashMap
<
ModuleStaticName
,
mpsc
::
Sender
<
DursMsg
>>
,
)
{
if
!
receivers
.is_empty
()
{
// Send message by copy To all modules that subscribed to this event
for
module_static_name
in
&
receivers
[
1
..
]
{
if
let
Some
(
module_sender
)
=
modules_senders
.get
(
module_static_name
)
{
...
...
@@ -243,7 +244,6 @@ fn send_msg_to_several_receivers(
}
}
// Send message by move to the last module to be receive
if
!
receivers
.is_empty
()
{
if
let
Some
(
module_sender
)
=
modules_senders
.get
(
&
receivers
[
0
])
{
module_sender
.send
(
msg
)
.unwrap_or_else
(|
_
|
{
panic!
(
"Fatal error: fail to relay DursMsg to {:?} !"
,
receivers
[
0
])
...
...
@@ -379,7 +379,8 @@ pub fn start_router(
);
// Log the number of modules_senders received
info!
(
"Router thread receive {} module senders"
,
"Router thread receive '{}' module registration ({} modules registered)."
,
module_static_name
.0
,
modules_senders
.len
()
);
}
...
...
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