Le 14/07/2010 02:11, Dibyendu Majumdar a écrit :
On Jul 13, 5:47 pm, Rémi Forax<[email protected]> wrote:
- tasks - syntactic support for submitting tasks to a thread pool -
using the concurrency library
The question is how to mix channels and IO ops
?http://weblogs.java.net/blog/forax/archive/2009/11/22/nio-server-cont...
can be one part of the answer
Looks similar to what Go does when handling network IO. I think though
that an approach that requires creating special versions of read()
that do this isn't going to work well with non-cooperating stuff. The
problem with all the coroutine implementations (including Go) is that
they require cooperation to succeed. This may be okay as long as code
is under one's control, but may be hard to get benefit from when third-
party libraries are used.
Or you patch the jdk i.e install your classes in bootstrap path
before the platform classes to trap all legacy IO and redirect
them to your system.
By the way, the blog entry only show how to deal with network IO,
you have to provide the same trick for file based IO.
The asynchronous IO API of jdk7 might help.
Regards
Dibyendu
cheers,
Rémi
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.