state used to implement ca_pend_io and sync group block should be in a thread private variable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Invalid
|
Undecided
|
Unassigned |
Bug Description
It works just fine to use no-callback get in non-preemptive callback mode, but ca_pend_io must always be used by only one thread at a
time for a particular batch of no-callback gets that might be outstanding. Calling, ca_pend_io from two threads at the same time
will result in undefined behavior (waiting too long, disrupting the mechanism that counts the number of outstanding gets, disrupting the mechanism that keeps batches of gets independent, etc). Similar warnings probably apply to ca sync group blocking calls.
In a future release it would probably be appropriate to move the state which is accessed by no-callback get and ca_pend_io, and the blocking
components of ca synchronous groups, into a thread private variable. This would eliminate any possibility of two threads manipulating these state variables at the same time, and produce a more predictable user experience.
tags: | added: ca |
tags: | added: cleanup |
Changed in epics-base: | |
status: | New → Invalid |