> > > To clarify: operations on the `IOStream` type use the "ios" library. > Operations on `LibuvStream` (and its subtypes) use Libuv. >
Huh, didn't know that. Sorry for confusion in previous answer and thanks for valuable comment. > On Thu, May 19, 2016 at 6:36 PM, Isaiah Norton <[email protected] > <javascript:>> wrote: > >> I don't think this happens for normal file IO. >> >> >> Right, good point. The stuff in the thread linked by Andrei applies to >> Libuv streams only. >> >> I think that Julia IO is built on libuv >>> >> >> Julia IO is mostly built on libuv, but file IO uses the internal ios >> library that is part of flisp. >> >> On Thu, May 19, 2016 at 5:43 PM, Yichao Yu <[email protected] >> <javascript:>> wrote: >> >>> On Thu, May 19, 2016 at 5:24 PM, Andrei Zh <[email protected] >>> <javascript:>> wrote: >>> > Based on answers to my own question, I believe it's safe to assume that >>> > `read()` on file will switch to another task during IO operation. >>> >>> I don't think this happens for normal file IO. >>> >>> > >>> > >>> > >>> > On Tuesday, May 17, 2016 at 2:03:21 AM UTC+3, ggggg wrote: >>> >> >>> >> Hello All, >>> >> >>> >> I think that Julia IO is built on libuv, and that libuv offers >>> >> asynchronous IO to the filesystem. Is this exposed through the Julia >>> API? I >>> >> can't figure it out from the documentation. I did a simple test >>> >> >>> >> julia> tic(); t = @async read(open("filename"),UInt8,2500000000); >>> yield(); >>> >> toc() >>> >> >>> >> elapsed time: 9.094271773 seconds >>> >> >>> >> and it seems that reading blocks without yielding. >>> >> >>> >> Is there a way to do this where the reading task yields to other >>> processes >>> >> while it is getting the data from disk? >>> >> >>> >> >>> >> >>> > >>> >> >> >
