17.3. What Happens When the Core Runs

Although the previous section was a bit too much technical the major information was that the blocking operations can cause a preemption and both the Core and the application can run in the meantime. In particular object states after the blocking operation can be different from the states before the operation. This sections describes potential pitfalls.

[Note]Note

A preemption can occur due to a blocking operation only.

When the Core runs all Core subsystems run too. This means that objects can migrate or be garbage collected, for example. Object replicas can be deleted or become inconsistent. In order to prevent such a behavior objects must be strong referenced from the stack. Note that this does not work for object replicas and one has to be very careful when working with them. The following list summarizes common errors: