@Richard D what do i need to do to accomplish that??
Here's how I do it:
Dim Stream As BinaryStream = BinaryStream.Create(File, True)
Dim CurrentThread As Thread = App.CurrentThread
If CurrentThread = Nil Then
Const ChunkSize = 1024000
For I As Integer = 0 To Contents.Size - 1 Step ChunkSize
Dim Chunk As String = Contents.StringValue(I, Min(ChunkSize, Contents.Size - I))
In this case Contents is a MemoryBlock. If called on the main thread, it just writes the entire contents at once, since adding a loop won't help you in any way and there's no thread to sleep. But if called on a thread, it writes in 1MB chunks and rests for a moment.