Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hidra
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
steinbac
hidra
Commits
8a65d1f1
Commit
8a65d1f1
authored
8 years ago
by
Manuela Kuhn
Browse files
Options
Downloads
Patches
Plain Diff
Fixed context in dataTransferAPI
parent
99471405
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
APIs/dataTransferAPI.py
+8
-5
8 additions, 5 deletions
APIs/dataTransferAPI.py
with
8 additions
and
5 deletions
APIs/dataTransferAPI.py
+
8
−
5
View file @
8a65d1f1
...
@@ -38,8 +38,11 @@ class dataTransfer():
...
@@ -38,8 +38,11 @@ class dataTransfer():
# and then using that for creating sockets
# and then using that for creating sockets
# (source: ZeroMQ, Messaging for Many Applications by Pieter Hintjens)
# (source: ZeroMQ, Messaging for Many Applications by Pieter Hintjens)
if
context
:
if
context
:
self
.
context
=
context
self
.
context
=
context
self
.
externalContext
=
True
self
.
extContext
=
True
else
:
self
.
context
=
zmq
.
Context
()
self
.
extContext
=
False
self
.
signalHost
=
signalHost
self
.
signalHost
=
signalHost
...
@@ -78,8 +81,8 @@ class dataTransfer():
...
@@ -78,8 +81,8 @@ class dataTransfer():
raise
Excepition
(
"
Argument
'
targets
'
must be list.
"
)
raise
Excepition
(
"
Argument
'
targets
'
must be list.
"
)
if
not
self
.
context
:
if
not
self
.
context
:
self
.
context
=
zmq
.
Context
()
self
.
context
=
zmq
.
Context
()
self
.
ext
ernal
Context
=
False
self
.
extContext
=
False
signal
=
None
signal
=
None
# Signal exchange
# Signal exchange
...
@@ -540,7 +543,7 @@ class dataTransfer():
...
@@ -540,7 +543,7 @@ class dataTransfer():
# if the context was created inside this class,
# if the context was created inside this class,
# it has to be destroyed also within the class
# it has to be destroyed also within the class
if
not
self
.
ext
ernal
Context
and
self
.
context
:
if
not
self
.
extContext
and
self
.
context
:
try
:
try
:
self
.
log
.
info
(
"
Closing ZMQ context...
"
)
self
.
log
.
info
(
"
Closing ZMQ context...
"
)
self
.
context
.
destroy
(
0
)
self
.
context
.
destroy
(
0
)
...
...
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