You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: settable_struct.rb
    path of file: ./repos/concurrent-ruby/lib/concurrent-ruby/concurrent
    
    the code of the file until where you have to start completion: require 'concurrent/errors'
require 'concurrent/synchronization/abstract_struct'
require 'concurrent/synchronization/lockable_object'

module Concurrent

  # An thread-safe, write-once variation of Ruby's standard `Struct`.
  # Each member can have its value set at most once, either at construction
  # or any time thereafter. Attempting to assign a value to a member
  # that has already been set will result in a `Concurrent::ImmutabilityError`.
  #
  # @see http://ruby-doc.org/core/Struct.html Ruby standard library `Struct`
  # @see http://en.wikipedia.org/wiki/Final_(Java) Java `final` keywor
    
      def define_struct(name, members, &block)
        synchronize do
          clazz = Synchronization::AbstractStruct.define_struct_class(SettableStruct, Synchronization::LockableObject, name, members, &block)
          members.each_with_index do |member, index|
            clazz.send :remove_method, member if clazz.instance_methods.include? member
            clazz.send(:define_method, member) do
              synchronize { @values[index] }
            end
            clazz.send(:define_method, "#{member}=") do |value|
              synchronize do
                unless @values[index].nil?
                  raise Concurrent::ImmutabilityError.new('struct member has already been set')
                end
                @values[index] = value
              end
            end
          end
          clazz
        end