> status = dbPutLinkAsync(plink, DBR_DOUBLE, &prec->oval, 1);
> if (!status)
> prec->pact = TRUE;
> else if (status == S_db_noLSET)
> status = dbPutLink(plink, DBR_DOUBLE, &prec->oval, 1);
Can you describe the difference between dbPutLink() and dbPutLinkAsync()? Naively I would expect that dbPutLinkAsync() would include a completion callback, and possibly some means of cancellation.
Perhaps what you are after isn't so much a decision, but an effect. Maybe it would be better to either require the caller to check dbLinkIsVolatile() to find out whether puts complete immediately, or have a special status code to indicate that the request was successfully sent?
> status = dbPutLinkAsync( plink, DBR_DOUBLE, &prec->oval, 1);
> if (!status)
> prec->pact = TRUE;
> else if (status == S_db_noLSET)
> status = dbPutLink(plink, DBR_DOUBLE, &prec->oval, 1);
Can you describe the difference between dbPutLink() and dbPutLinkAsync()? Naively I would expect that dbPutLinkAsync() would include a completion callback, and possibly some means of cancellation.
Perhaps what you are after isn't so much a decision, but an effect. Maybe it would be better to either require the caller to check dbLinkIsVolatile() to find out whether puts complete immediately, or have a special status code to indicate that the request was successfully sent?