synchronization - Ada: select then abort statement -
i have question regarding "select abort" language construct in ada. task i'm using looks like:
select delay 1.0; partial result; abort loop ... long calculation ... entry call other task; ... end loop; end select;
can code in abort branch aborted anywhere or @ points delay statements or entry calls? in program code in abort branch performs long calculation , when aborted partial calculated result still useful. if code can interrupted anywhere problem of data inconsistencies arises.
thank you
the abort can happen anywhere, except in abort deferred region. protected operation abort deferred region, can store partial results inside protected object.
Comments
Post a Comment