kanaida Active Member Licensed User Longtime User Jun 13, 2014 #1 I'm trying to write to a file with ought hanging the ui. I've tried a service but it hangs. Any ideas? It's a large file.
I'm trying to write to a file with ought hanging the ui. I've tried a service but it hangs. Any ideas? It's a large file.
Erel B4X founder Staff member Licensed User Longtime User Jun 13, 2014 #2 You can use AsyncStreams to write to a file asynchronously. However in most cases there are simpler alternatives. What exactly are you writing? Can't you use a database file instead? Upvote 0
You can use AsyncStreams to write to a file asynchronously. However in most cases there are simpler alternatives. What exactly are you writing? Can't you use a database file instead?
kanaida Active Member Licensed User Longtime User Jun 13, 2014 #3 Muhahaha Top Secret this time. I'll make a donation when i'm finished. Upvote 0
kanaida Active Member Licensed User Longtime User Jun 18, 2014 #4 I tried using the async streams library. It brings up the wait/close dialog. Is there a way to make it not come up during long running operations? It needs to write for a long period of time. A database would not be suitable as it's a new format. Upvote 0
I tried using the async streams library. It brings up the wait/close dialog. Is there a way to make it not come up during long running operations? It needs to write for a long period of time. A database would not be suitable as it's a new format.
Erel B4X founder Staff member Licensed User Longtime User Jun 19, 2014 #5 AsyncStreams never blocks the main thread. However the code that calls AStream.Write can block the main thread. It is hard to assist without seeing any of the code. You can add DoEvents to prevent the ANR dialog. Upvote 0
AsyncStreams never blocks the main thread. However the code that calls AStream.Write can block the main thread. It is hard to assist without seeing any of the code. You can add DoEvents to prevent the ANR dialog.