Class: MiniRacer::Isolate
- Inherits:
 - 
      Object
      
        
- Object
 - MiniRacer::Isolate
 
 
- Defined in:
 - lib/mini_racer.rb,
lib/mini_racer/truffleruby.rb 
Instance Method Summary collapse
- #idle_notification(idle_time) ⇒ Object
 - #init_with_snapshot(snapshot) ⇒ Object
 - 
  
    
      #initialize(snapshot = nil)  ⇒ Isolate 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Isolate.
 - #low_memory_notification ⇒ Object
 
Constructor Details
#initialize(snapshot = nil) ⇒ Isolate
Returns a new instance of Isolate.
      75 76 77 78 79 80 81 82  | 
    
      # File 'lib/mini_racer.rb', line 75 def initialize(snapshot = nil) unless snapshot.nil? || snapshot.is_a?(Snapshot) raise ArgumentError, "snapshot must be a Snapshot object, passed a #{snapshot.inspect}" end # defined in the C class init_with_snapshot(snapshot) end  | 
  
Instance Method Details
#idle_notification(idle_time) ⇒ Object
      329 330 331  | 
    
      # File 'lib/mini_racer/truffleruby.rb', line 329 def idle_notification(idle_time) true end  | 
  
#init_with_snapshot(snapshot) ⇒ Object
      319 320 321 322 323  | 
    
      # File 'lib/mini_racer/truffleruby.rb', line 319 def init_with_snapshot(snapshot) # TruffleRuby does not have a 1-1 concept with isolate. # However, isolate can hold a snapshot, and code and ASTs are shared between contexts. @snapshot = snapshot end  | 
  
#low_memory_notification ⇒ Object
      325 326 327  | 
    
      # File 'lib/mini_racer/truffleruby.rb', line 325 def low_memory_notification GC.start end  |