skaller wrote:
> OK, I see two options here:
>
> A. Modify the stream typeclass so all stream I/O requires
> a job_queue argument.
>
> B. Make a new type
>
>       afd_t = fd_t * job_queue
>
> Now there are two file types, one for sync I/O and one
> for async I/O .. but only for posix lol (since Windows
> has no problem with async I/O). Also there's a problem
> with memory management of the job_queue.
>
> Solution B locks the file handling into async mode
> with a particular queue at time afd_t object is
> constructed. So actually you could do this:
>
>       read ( (q,fd), ....
>
> Comments?

I think you mean "read ( (fd, q), ...". The async difference between 
posix and windows can't be hidden behind in the RTL, can it? Secondly, 
will there ever be a use case for an end user to modify the job_queue? 
If so, I vote for B. For simple stuff, we can have a function like 
"fopen_async" that returns a afd_t for ease of use and has the default 
job_queue built into the type. For more complicated things, they could 
just pass in their own job_queue.

-e

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to