Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
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
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
yehaojie
plugin-GUI
Commits
ec1cc9a9
Commit
ec1cc9a9
authored
7 years ago
by
Aaron Cuevas Lopez
Committed by
kmichaelfox
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add some extra thread safety to the network events module
parent
f45137ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Plugins/NetworkEvents/NetworkEvents.cpp
+6
-0
6 additions, 0 deletions
Source/Plugins/NetworkEvents/NetworkEvents.cpp
Source/Plugins/NetworkEvents/NetworkEvents.h
+1
-1
1 addition, 1 deletion
Source/Plugins/NetworkEvents/NetworkEvents.h
with
7 additions
and
1 deletion
Source/Plugins/NetworkEvents/NetworkEvents.cpp
+
6
−
0
View file @
ec1cc9a9
...
...
@@ -216,8 +216,14 @@ bool NetworkEvents::closesocket()
zmq_ctx_destroy
(
zmqcontext
);
// this will cause the thread to exit
zmqcontext
=
nullptr
;
if
(
!
stopThread
(
500
))
{
std
::
cerr
<<
"Network thread timeout. Forcing thread termination, system could be lefr in an unstable state"
<<
std
::
endl
;
}
if
(
!
shutdown
)
createZmqContext
();
// and this will take care that processor graph doesn't attempt to delete the context again
}
#endif
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Source/Plugins/NetworkEvents/NetworkEvents.h
+
1
−
1
View file @
ec1cc9a9
...
...
@@ -117,7 +117,7 @@ public:
int
urlport
;
String
socketStatus
;
bool
threadRunning
;
std
::
atomic
<
bool
>
threadRunning
;
private:
...
...
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