Skip to content
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

FLUsHOUTPUT in a background task? #1774

Open
masinter opened this issue Jun 28, 2024 · 5 comments
Open

FLUsHOUTPUT in a background task? #1774

masinter opened this issue Jun 28, 2024 · 5 comments

Comments

@masinter
Copy link
Member

masinter commented Jun 28, 2024

this poster from StackOVerflow had a question:

https://stackoverflow.com/questions/78645353/write-text-i-o-stream-to-file-with-interlisp-medley

The problem is these are buffered streams and there is no background task of writing out the bytes. So you won't see the lalala until you caall (FLUWHOUTPUT S) or close the stream.
(@lispm could you reply to the poster? I dont have 50 Overflow points or whatever)

Should there be, and when and where should it run? Is it a problem for process streams?
DSK and UNIX only? Not a network problem?

Originally posted by @masinter in #1405 (comment)

@masinter masinter changed the title FLUAHOUTPUT in a background task? FLUsHOUTPUT in a background task? Jun 28, 2024
@nbriggs
Copy link
Contributor

nbriggs commented Jun 28, 2024

Why is it a problem if it is a buffered stream and doing exactly what you expect a buffered stream to do? Having a background task going around and arbitrarily flushing output seems like a pretty anti-social thing to do.

@lispm
Copy link

lispm commented Jun 28, 2024 via email

@Angular-Angel
Copy link

Angular-Angel commented Jul 11, 2024

Forget background task, I can't get it to print to the file at all, even with calling (FLUSHOUTPUT S) manually. Closing the file doesn't do anything, either.

@nbriggs
Copy link
Contributor

nbriggs commented Jul 15, 2024

@Angular-Angel, I have no trouble writing files in Medley - I do it all the time. If I can replicate what you're doing I can diagnose what's going wrong for you.

@Angular-Angel
Copy link

I found a solution. Ended up using (DRIBBLE 'ouptut), it worked well enough for my purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants