Policy
Description:
public enum Policy
Policy determines what happens on exit from Context.
Content:
Enum values:
- DEFAULT - Performs default action
on exit from thread.
- FREE - Goes through the free list and
attempts to free un-freed elements until all elements are freed.
- RELEASE - Release the un-freed
elements to either helper thread or to main loop. Please note it may block while adding to queue.
- THREAD_EXIT - Performs the
same action as on exit from current thread.
- TRY_FREE - Goes through the free
list and attempts to free un-freed elements.
- TRY_RELEASE - Release the un-
freed elements to either helper thread or to main loop. Please note if the operation would block it is not performed.
Methods:
- public bool is_blocking ()
Checks if policy blocks or is lock-free. Please note that it works on
a concrete policy only.
- public bool is_concrete ()
Checks if the policy is concrete or if it depends on global variables.
- public bool is_safe ()
Checks if policy guarantees freeing all elements. Please note that it
works on a concrete policy only.
- public Policy to_concrete ()
Finds concrete policy which corresponds to given policy.