Class: Knjappserver::Thread_instance

Inherits:
Object
  • Object
show all
Defined in:
lib/include/class_knjappserver_threadding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Thread_instance

Returns a new instance of Thread_instance.



84
85
86
# File 'lib/include/class_knjappserver_threadding.rb', line 84

def initialize(args)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



82
83
84
# File 'lib/include/class_knjappserver_threadding.rb', line 82

def args
  @args
end

Instance Method Details

#joinObject



88
89
90
# File 'lib/include/class_knjappserver_threadding.rb', line 88

def join
  sleep 0.1 while !@args[:done]
end

#join_errorObject



92
93
94
95
# File 'lib/include/class_knjappserver_threadding.rb', line 92

def join_error
  self.join
  raise @args[:error_obj] if @args[:error_obj]
end