
  -spec process_flag(save_calls, N) -> OldN
                        when N :: 0..10000, OldN :: 0..10000.

  -spec process_flag(fullsweep_after, FullsweepAfter) -> OldFullsweepAfter
                        when
                            FullsweepAfter :: non_neg_integer(),
                            OldFullsweepAfter :: non_neg_integer().

Since:
  OTP 24.0

  -spec process_flag(min_bin_vheap_size, MinBinVHeapSize) ->
                        OldMinBinVHeapSize
                        when
                            MinBinVHeapSize :: non_neg_integer(),
                            OldMinBinVHeapSize :: non_neg_integer().

Since:
  OTP R13B04

  -spec process_flag(min_heap_size, MinHeapSize) -> OldMinHeapSize
                        when
                            MinHeapSize :: non_neg_integer(),
                            OldMinHeapSize :: non_neg_integer().

  -spec process_flag(sensitive, Boolean) -> OldBoolean
                        when Boolean :: boolean(), OldBoolean :: boolean().

  -spec process_flag(error_handler, Module) -> OldModule
                        when Module :: atom(), OldModule :: atom().

  -spec process_flag(trap_exit, Boolean) -> OldBoolean
                        when Boolean :: boolean(), OldBoolean :: boolean().

  -spec process_flag(max_heap_size, MaxHeapSize) -> OldMaxHeapSize
                        when
                            MaxHeapSize :: max_heap_size(),
                            OldMaxHeapSize :: max_heap_size().

Since:
  OTP 19.0

  -spec process_flag(message_queue_data, MQD) -> OldMQD
                        when
                            MQD :: message_queue_data(),
                            OldMQD :: message_queue_data().

Since:
  OTP 19.0

  -spec process_flag(priority, Level) -> OldLevel
                        when
                            Level :: priority_level(),
                            OldLevel :: priority_level().

  Types:
    -type priority_level() :: low | normal | high | max.

  Sets the process priority. Level is an atom. Four priority
  levels exist: low, normal, high, and max. Default is 
  normal.

  Note:
    Priority level max is reserved for internal use in the
    Erlang runtime system, and is not to be used by others.

  Internally in each priority level, processes are scheduled in a
  round robin fashion.

  Execution of processes on priority normal and low are
  interleaved. Processes on priority low are selected for
  execution less frequently than processes on priority normal.

  When runnable processes on priority high exist, no processes on
  priority low or normal are selected for execution. Notice
  however that this does not mean that no processes on priority 
  low or normal can run when processes are running on priority 
  high. When using multiple schedulers, more processes can be
  running in parallel than processes on priority high. That is, a 
  low and a high priority process can execute at the same time.

  When runnable processes on priority max exist, no processes on
  priority low, normal, or high are selected for execution. As
  with priority high, processes on lower priorities can execute in
  parallel with processes on priority max.

  Scheduling is pre-emptive. Regardless of priority, a process is
  pre-empted when it has consumed more than a certain number of
  reductions since the last time it was selected for execution.

  Note:
    Do not depend on the scheduling to remain exactly as it is
    today. Scheduling is likely to be changed in a future release
    to use available processor cores better.

  There is no automatic mechanism for avoiding priority inversion,
  such as priority inheritance or priority ceilings. When using
  priorities, take this into account and handle such scenarios by
  yourself.

  Making calls from a high priority process into code that you has
  no control over can cause the high priority process to wait for
  a process with lower priority. That is, effectively decreasing the
  priority of the high priority process during the call. Even if
  this is not the case with one version of the code that you have no
  control over, it can be the case in a future version of it. This
  can, for example, occur if a high priority process triggers code
  loading, as the code server runs on priority normal.

  Other priorities than normal are normally not needed. When other
  priorities are used, use them with care, especially priority 
  high. A process on priority high is only to perform work for
  short periods. Busy looping for long periods in a high priority
  process causes most likely problems, as important OTP servers run
  on priority normal.

  Returns the old value of the flag.
