Created
October 20, 2018 21:46
-
-
Save csmr/c114ae746f5ba531830ae553fe184544 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# read_pipes | |
def read_pipes | |
msg = nil | |
msg = read_line_nonblocking( @pipe_from_eng ) | |
if msg != nil | |
p_dbg "got msg: #{msg}", self | |
end | |
if msg == "2" | |
@pipe_to_ui.puts "Engine told me: 2" | |
@pipe_to_ui.flush | |
end | |
msg = nil | |
msg = read_line_nonblocking( @pipe_from_ui ) | |
if msg != nil | |
p_dbg "got msg: #{msg}", self | |
@msg_stack.push msg | |
end | |
end | |
baweaver
commented
Oct 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment