class Sunspot::SessionProxy::ThreadLocalSessionProxy

This class implements a session proxy that creates a different Session object for each thread. Any multithreaded application should use this proxy.

Constants

FINALIZER

Attributes

config[R]

The configuration with which the thread-local sessions are initialized.

Public Class Methods

new(config = Sunspot::Configuration.build) click to toggle source

Optionally pass an existing Sunspot::Configuration object. If none is passed, a default configuration is used; it can then be modified using the config attribute.

# File lib/sunspot/session_proxy/thread_local_session_proxy.rb, line 29
def initialize(config = Sunspot::Configuration.build)
  @config = config
  ObjectSpace.define_finalizer(self, FINALIZER)
end