main () {
dpConnect("myCB", some_dp);
}
void myCB(const string &source_dp, const time &value) {
dpDisconnect("myCB", some_dp);
DebugTN("called myCB");
}
If you execute that as a control manager (replacing some_dp by a valid DP in both main and myCB) it will crash unless you comment out the dpDisconnect. So either the problem is not solved, or I am misunderstanding the entry in the release notes.
Re: 3.16 P016 dpDisconnect within callback makes manager crash
Postby dvribeira »
For further information, I know I had in the code dpDisconnects within callbacks working properly, so I did some further tests:
If in the previous code, we replace
And run it, then the CB is not called back immediately, then if we change the value of the DP, the dpDisconnect is called without crashing and he Debug line is executed as well without problems.
So I guess there is a race condition there... I did not further test if this happens only if you execute the dpDisconnect on a first call (with answer parameter being true or omitted) or if it happens as well on a fast enough DP change triggering the CB too fast.