class Yoda::Server::ConcurrentWriter
Wrapper class for writer to make thread safe
Public Class Methods
new(channel)
click to toggle source
@param [::LanguageServer::Protocol::Transport::Stdio::Writer]
# File lib/yoda/server/concurrent_writer.rb, line 6 def initialize(channel) @channel = channel @mutex = Mutex.new end
Public Instance Methods
write(*args)
click to toggle source
# File lib/yoda/server/concurrent_writer.rb, line 11 def write(*args) @mutex.synchronize { @channel.write(*args) } end