Commit bc7fa41d authored by olivier R-D's avatar olivier R-D

document that network operations should not be done in handler

parent da3166e5
......@@ -23,6 +23,9 @@ class SubHandler(object):
"""
Subscription Handler. To receive events from server for a subscription
data_change and event methods are called directly from receiving thread.
Do not do expensive, slow or network operation there. Create another
thread if you need to do such a thing
"""
def data_change(self, handle, node, val, attr):
......
......@@ -269,6 +269,12 @@ class Client(object):
Create a subscription.
returns a Subscription object which allow
to subscribe to events or data on server
handler argument is a class with data_change and/or event methods.
These methods will be called when notfication from server are received.
See example-client.py.
Do not do expensive/slow or network operation from these methods
since they are called directly from receiving thread. This is a design choice,
start another thread if you need to do such a thing.
"""
params = ua.CreateSubscriptionParameters()
params.RequestedPublishingInterval = period
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment