Message4797
Thanks. That is a fast answer, this will let me erase the workaround
from my project when you release the next version of jython2.5.
The exact example i was using is running Rpyc in jython so i can have
the best of both worlds, the java api and the cpython api which is more
complete that jython right now. This is mandatory for my project since i
have some code which uses Tkinter to draw its GUI and rewritting it is
not an option.
So i installed the last jython and Rpyc. After some modifications to
Rpyc i managed to make it load under jython but when I tried to make the
jython and cpython communicate both process would freeze forever. It
took me a long time till i tracked down the problem to the pipe
implementation, at first i thought that the problem was inside Rpyc.
Rpyc sends information between the two processes using the
write()+flush() to send data, and read() to read it. It does not use
directly print or readline, so i think it wont be a problem.
In spite of that I think it is quite dangerous to make a process stuck
because of an optimization, imagine you are implementing a unix shell in
jython, the user writes 'ls' + <enter> but nothing happens.
ציטוט Philip Jenvey:
> Philip Jenvey <pjenvey@users.sourceforge.net> added the comment:
>
> You're right, we definitely need to be flushing the OutputStream wrapped
> by StreamIO. I've fixed that in r6449
>
> Did your extracted out example with the extra flush work? If so, jython
> trunk should be the equivalent
>
> I do fear that this example still might block due to our file
> implementation. Our readline reads in large chunks as an optimization
> (this is copied from py3k), and I think that could still deadlock the
> stream to the process. I would like to see the actual code you're trying
>
> Since the flush issue is solved I'm closing this issue. Feel free to log
> another if we need to continue pressing forward on this example
>
> ----------
> resolution: -> fixed
> status: open -> closed
>
> _______________________________________
> Jython tracker <report@bugs.jython.org>
> <http://bugs.jython.org/issue1367>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2009-06-05 07:15:27 | marcelotaube | link | issue1367 messages |
2009-06-05 07:15:26 | marcelotaube | create | |
|