Class: Concurrent::ErlangActor::NoActor — Concurrent Ruby

# Class: Concurrent::ErlangActor::NoActor

Inherits:
  Error
  - Object
  - Error
  - Concurrent::ErlangActor::NoActor
  show all

Defined in:
  lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb

## Overview

An error used when actor tries to link or monitor terminated actor.

## Instance Attribute Summary collapse

- #pid ⇒ Pid readonly

## Instance Method Summary collapse

- #==(o) ⇒ true, false (also: #eql?)
- #hash ⇒ Integer
- #initialize(pid = nil) ⇒ self constructor

## Constructor Details

### #initialize(pid = nil) ⇒ `self`

Parameters:

- pid (`Pid`) (defaults to: `nil`)

    1507
    1508
    1509
    1510
    # File 'lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb', line 1507

    def initialize(pid = nil)
      super(pid.to_s)
      @pid = pid
    end

## Instance Attribute Details

### #pid ⇒ `Pid` (readonly)

Returns:

- (`Pid`)

    1503
    1504
    1505
    # File 'lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb', line 1503

    def pid
      @pid
    end

## Instance Method Details

### #==(o) ⇒ `true`, `false` Also known as: eql?

Returns:

- (`true`, `false`)

    1513
    1514
    1515
    # File 'lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb', line 1513

    def ==(o)
      o.class == self.class && o.pid == self.pid
    end

### #hash ⇒ `Integer`

Returns:

- (`Integer`)

    1520
    1521
    1522
    # File 'lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb', line 1520

    def hash
      pid.hash
    end