You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the difference between Source and RawSource?
There is no document to tell me, it's too obscure and difficult to understand.
When I use SystemFileSystem, I get RawSource, but when I get and process byte arrays, only Source has a read method.
If I need to provide an input source, should the parameter passed during the function call be RawSource or Source?
which step does the time-consuming data reading occur? Where should I use withContext to switch coroutines to IO Dispatcher?
At the step where SystemFileSystem retrieves RawSource?
At it happen at the RawSource.buffered() ?
At the Source.readByteArray()?
Thanks !!!!!
The text was updated successfully, but these errors were encountered:
Please let me know if you think there are parts of these docs that are not clear and should be improved to better elaborate the difference and use-cases.
The actual IO won't happen until you read something from Source, so in terms of blocking, it makes sense to schedule Source.readByteArray() call into a separate coroutine. However, note that primitives provided by the library are not thread-safe, so proper synchronization will be required if you decide to use the source concurrently.
What is the difference between Source and RawSource?
There is no document to tell me, it's too obscure and difficult to understand.
When I use SystemFileSystem, I get RawSource, but when I get and process byte arrays, only Source has a read method.
If I need to provide an input source, should the parameter passed during the function call be RawSource or Source?
which step does the time-consuming data reading occur? Where should I use withContext to switch coroutines to IO Dispatcher?
At the step where SystemFileSystem retrieves RawSource?
At it happen at the RawSource.buffered() ?
At the Source.readByteArray()?
Thanks !!!!!
The text was updated successfully, but these errors were encountered: