Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thallium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
thallium
Commits
ce73a971
Commit
ce73a971
authored
Oct 29, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using margo_is_listening to check if wrapped margo instance is a server
parent
883c0226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
include/thallium/engine.hpp
include/thallium/engine.hpp
+18
-0
No files found.
include/thallium/engine.hpp
View file @
ce73a971
...
...
@@ -189,12 +189,30 @@ public:
&
engine
::
on_finalize_cb
,
static_cast
<
void
*>
(
this
));
}
/**
* @brief Builds an engine around an existing margo instance.
*
* @param mid Margo instance.
* @param mode THALLIUM_SERVER_MODE or THALLIUM_CLIENT_MODE.
*/
[[
deprecated
]]
engine
(
margo_instance_id
mid
,
int
mode
)
{
m_mid
=
mid
;
m_is_server
=
(
mode
==
THALLIUM_SERVER_MODE
);
m_owns_mid
=
false
;
}
/**
* @brief Builds an engine around an existing margo instance.
*
* @param mid Margo instance.
*/
engine
(
margo_instance_id
mid
)
{
m_mid
=
mid
;
m_owns_mid
=
false
;
m_is_server
=
margo_is_listening
(
mid
);
}
/**
* @brief Copy-constructor is deleted.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment