Sha256: 5b65b2e1103e57810410db7783f5b11754ae336feeb11ac9176d224da7b276ee

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

require 'celluloid/fiber'

module Celluloid
  class Thread < ::Thread
    def celluloid?
      true
    end

    # Obtain the role of this thread
    def role
      self[:celluloid_role]
    end

    def role=(role)
      self[:celluloid_role] = role
    end

    # Obtain the Celluloid::Actor object for this thread
    def actor
      self[:celluloid_actor]
    end

    # Obtain the Celluloid task object for this thread
    def task
      self[:celluloid_task]
    end

    # Obtain the Celluloid mailbox for this thread
    def mailbox
      self[:celluloid_mailbox]
    end

    # Obtain the call chain ID for this thread
    def call_chain_id
      self[:celluloid_chain_id]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
celluloid-0.14.1 lib/celluloid/thread.rb
celluloid-0.14.1.pre lib/celluloid/thread.rb