-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ccall()-ed function output not shown until execution is finished #153
Comments
While your C code is running, the IJulia kernel is not running; there is no way for it to send stdout to the front-end until you give IJulia some cycles. I don't see any way to fix this, short of having your C code call the the equivalent of |
Thanks Steven. That is an option in my case, because I generally link to libjulia.so, so that would help. It gets trickier with other libraries of course. |
It would be nice to have a |
Yes, would be great. The issue is that yield() is in julia code now, and doing About my original question, I understand if the contents I printed appear when the function returns, but in the case of using |
@minrk, does the |
It does - all Python print statements are stream messages. I can print with |
I am not sure how to enable logging of stdout for ccall()-ed libraries. For example, lets make ``test.c` be
compite with
gcc -shared test.c -o test.so -fPIC
, and then call it from IJulia (console or qtconsole):Instead of seeing a series of 'hehe', separated by a 500ms pause, I see nothing at all with
console
, while I see the whole bunch of stdout appearing instantly once the ccall returns withqtconsole
. It looks like something related to how stdout is handled, maybe close to #23Thanks.
The text was updated successfully, but these errors were encountered: