Skip to content

How to use subscription data in other thread? #1431

@JungminHaMartin

Description

@JungminHaMartin

I subscribe some nodes and I want to use the value in other thread.
How I deal with the subscripted data?
Please show the code as below.

class SubHandler(object):

def datachange_notification(self, node, val, data):

    dict[node] = val
    Thread_Status.node_value = val

def event_notification(self, event):
    print("Python: New event", event)

class Thread_Status(QThread):
def init(self, parent):
super().init(parent)
self.parent = parent
self.node = []
self.node_value = []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions