Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions lib/cxxproject/ide_interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ def initialize()
@socket = nil
@abort = false
@thread = nil
end

def mutex
@mutex ||= Mutex.new
@mutex = Mutex.new
end

def connect(port)
Expand Down Expand Up @@ -114,7 +111,7 @@ def set_errors(error_array)
msg.message.rstrip!
packet = create_error_packet(msg)
begin
mutex.synchronize { @socket.write(packet) }
@mutex.synchronize { @socket.write(packet) }
rescue Exception => e
Printer.printError "Error: #{e.message}"
set_abort(true)
Expand Down Expand Up @@ -162,7 +159,7 @@ def set_build_info(name_attr, config_name_attr, num = -1)
write_long(packet, num >=0 ? num : 0)

begin
mutex.synchronize { @socket.write(packet) if @socket }
@mutex.synchronize { @socket.write(packet) if @socket }
rescue Exception => e
Printer.printError "Error: #{e.message}"
set_abort(true)
Expand Down