SapphireSteel Forum
Welcome,
Guest
. Please
login
or
register
.
May 19, 2013, 02:43:02 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3883
Posts in
799
Topics by
669
Members
Latest Member:
m
SapphireSteel Forum
General
The Snug Bar
The Ruby Connector -- Long running commands
« previous
next »
Pages:
[
1
]
Author
Topic: The Ruby Connector -- Long running commands (Read 4304 times)
jpm
Newbie
Posts: 1
The Ruby Connector -- Long running commands
«
on:
February 24, 2009, 02:26:40 PM »
I call the ruby connector and some commands can take a long time so I changed the code to let me selectively make background threaded calls.
If I make a call and I tell it to run in the background then I fork a new thread and return an OK result immediately.
I plan on then periodically polling to see if the command has completed.
However, although the logic on the Ruby side to fork and return the initial OK result works fine and the rcRun loop is waiting for more input via rcRead the C# side does not get the OK result immediately and instead times out. Upon TIMEOUT the C# side ( TypeAndReply tr = rc.TRSendMsgInputEval(s); ) contains the correct results I sent but I do not understand why I am getting the TIMEOUT.
RESOLVED: although I was redirecting stdin/stdout before/after command evaluation once I forked the background thread its stdout get set back to the stdout read by the ruby connector and it looks like stdout caused the problem.
Thanks
Joe Mooney
«
Last Edit: February 24, 2009, 06:02:39 PM by jpm
»
Logged
Huw Collingbourne
Administrator
Hero Member
Posts: 933
Re: The Ruby Connector -- Long running commands
«
Reply #1 on:
February 25, 2009, 04:50:49 PM »
Glad you solved that. We were just about to try to figure it out.
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and Announcements
=> Amethyst
=> Ruby In Steel
=> Ruby Programming
=> The Snug Bar