Frank Church wrote:
On 28 December 2012 23:44, Göran Krampe <[email protected]> wrote:

On 12/28/2012 04:02 PM, Frank Church wrote:

I using the PipeableOSProcess to run ssh commands which return output
and Pharo hangs when I try it. Commands executing locally work okay, but
the ssh ones generally hang.

I do this alot in my current project and I have a small little framework
around this because IIRC the "problem" is that your call to #output will
block until #atEnd. So what you want to do if you do not want to block is
to fork off a background process that reads without blocking. This works
really well for me, so I run multiple of these in parallell and each is
given its own background Process that reads and copies into a WriteStream
on a String. So if I ask my "wrapper" for the output it will ask this
stream for its contents instead.

regards, Göran


I jumped straight in and tried to hack without learning some Smalltalk
basics but after spending a day with Pharo By Example I am beginning to
make some progress.

Is the Transcript in Pharo 1.4 different from the one used in the PBE
image? It displays ThreadedTranscript when I check its properties and it
doesn't seem to hang like the PBE image.

Some example code would really help here.

Thanks




Transcript was replaced at some point - I "think" it was after PBE publication. I link to some related posts below.

Regarding sample code... what are you trying to do? The way I commonly use the Transcript is...
   Transcript crShow: something asString, '---', somethingElse asString.

asString might not be the most efficient way, but its simple. Without 'asString', using the comma to concatenate strings often does does not work since non-string classes generally don't understand comma.

http://code.google.com/p/pharo/issues/detail?id=3948
http://www.mail-archive.com/[email protected]/msg51417.html
http://code.google.com/p/pharo/issues/list?can=1&q=summary%3Atranscript&sort=-id&colspec=ID+Type+Status+Summary+Milestone+Difficulty&cells=tiles

Reply via email to