
  [;1m-spec demonitor(MonitorRef) -> true when MonitorRef :: reference().[0m

  If [;;4mMonitorRef[0m is a reference that the calling process obtained
  by calling [;;4mmonitor/2[0m, this monitoring is turned off. If the
  monitoring is already turned off, nothing happens.

  Once [;;4mdemonitor(MonitorRef)[0m has returned, it is guaranteed that
  no [;;4m{'DOWN', MonitorRef, _, _, _}[0m message, because of the
  monitor, will be placed in the caller message queue in the future.
  However, a [;;4m{'DOWN', MonitorRef, _, _, _}[0m message can have been
  placed in the caller message queue before the call. It is
  therefore usually advisable to remove such a [;;4m'DOWN'[0m message from
  the message queue after monitoring has been stopped. [;;4m[0m
  [;;4mdemonitor(MonitorRef, [flush])[0m can be used instead of [;;4m[0m
  [;;4mdemonitor(MonitorRef)[0m if this cleanup is wanted.

  Note:
    For some important information about distributed signals, see
    the Blocking Signaling Over Distribution section in the 
    Processes chapter of the Erlang Reference Manual.

  Change:
    Before Erlang/OTP R11B (ERTS 5.5) [;;4mdemonitor/1[0m behaved
    completely asynchronously, that is, the monitor was active
    until the "demonitor signal" reached the monitored entity.
    This had one undesirable effect. You could never know when you
    were guaranteed not to receive a [;;4mDOWN[0m message because of
    the monitor.

    The current behavior can be viewed as two combined operations:
    asynchronously send a "demonitor signal" to the monitored
    entity and ignore any future results of the monitor.

  Failure: It is an error if [;;4mMonitorRef[0m refers to a monitoring
  started by another process. Not all such cases are cheap to check.
  If checking is cheap, the call fails with [;;4mbadarg[0m, for example if [;;4m[0m
  [;;4mMonitorRef[0m is a remote reference.

  [;1m-spec demonitor(MonitorRef, OptionList) -> boolean()[0m
  [;1m                   when[0m
  [;1m                       MonitorRef :: reference(),[0m
  [;1m                       OptionList :: [Option],[0m
  [;1m                       Option :: flush | info.[0m

  The returned value is [;;4mtrue[0m unless [;;4minfo[0m is part of [;;4mOptionList[0m.

  [;;4mdemonitor(MonitorRef, [])[0m is equivalent to [;;4mdemonitor(MonitorRef)[0m.

  [;;4mOption[0ms:

  [;;4m[;;4mflush[0m[0m:
    Removes (one) [;;4m{_, MonitorRef, _, _, _}[0m message, if there is
    one, from the caller message queue after monitoring has been
    stopped.

    Calling [;;4mdemonitor(MonitorRef, [flush])[0m is equivalent to the
    following, but more efficient:

      demonitor(MonitorRef),
      receive
          {_, MonitorRef, _, _, _} ->
              true
      after 0 ->
              true
      end

  [;;4m[;;4minfo[0m[0m:
    The returned value is one of the following:

    [;;4m[;;4mtrue[0m[0m:
      The monitor was found and removed. In this case, no [;;4m[0m
      [;;4m'DOWN'[0m message corresponding to this monitor has been
      delivered and will not be delivered.

    [;;4m[;;4mfalse[0m[0m:
      The monitor was not found and could not be removed. This
      probably because someone already has placed a [;;4m'DOWN'[0m
      message corresponding to this monitor in the caller
      message queue.

    If option [;;4minfo[0m is combined with option [;;4mflush[0m, [;;4mfalse[0m is
    returned if a flush was needed, otherwise [;;4mtrue[0m.

  Change:
    More options can be added in a future release.

  Failures:

  [;;4m[;;4mbadarg[0m[0m:
    If [;;4mOptionList[0m is not a list.

  [;;4m[;;4mbadarg[0m[0m:
    If [;;4mOption[0m is an invalid option.

  [;;4m[;;4mbadarg[0m[0m:
    The same failure as for [;;4mdemonitor/1[0m.
