dls-controls / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
32 stars 7 forks source link

Is `record.set(value)` thread safe? #142

Closed coretl closed 6 months ago

coretl commented 6 months ago

@evalott100 needs to set a PandA record from another OS thread (file writing, hence OS thread rather than coroutine). Is record.set threadsafe, or does it need to be done from the same thread each time?

Araneidae commented 6 months ago

I would expect record.set to be thread safe ... on the whole. Writing to the same record from multiple threads can result in surprises, but I don't think there is any fundamental constraint here.

Think this ought to be a conversation rather than an issue.