Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
1e5ee8c2
Commit
1e5ee8c2
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-412
: Added comments explaining event loop for AsyncCommClient
parent
be0b2ec3
No related branches found
No related tags found
1 merge request
!142
L2SS-412: Use asyncio for opcua and other clients
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/clients/comms_client.py
+11
-0
11 additions, 0 deletions
devices/clients/comms_client.py
with
11 additions
and
0 deletions
devices/clients/comms_client.py
+
11
−
0
View file @
1e5ee8c2
...
@@ -152,7 +152,18 @@ class AsyncCommClient(object):
...
@@ -152,7 +152,18 @@ class AsyncCommClient(object):
def
__init__
(
self
,
fault_func
,
event_loop
=
None
):
def
__init__
(
self
,
fault_func
,
event_loop
=
None
):
"""
"""
Create an Asynchronous communication client.
fault_func: Function to call to put the device to FAULT if an error is detected.
event_loop: Aysncio event loop to use. If None, a new event loop is created and
run in a separate thread. Only share event loops if any of the functions
executed doesn
'
t stall, as asyncio used a cooperative multitasking model.
If the executed functions can stall (for a bit), use a dedicated loop to avoid
interfering with other users of the event loop.
All coroutines need to be executed in this loop, which wil also be stored
as the `event_loop` member of this object.
"""
"""
self
.
fault_func
=
fault_func
self
.
fault_func
=
fault_func
self
.
running
=
False
self
.
running
=
False
...
...
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