Re:No More Callbacks: 10,000 Actors, 10,000 Threads, 10,000 ...
by pron on Thursday October 17, 2013 @08:29AM
(#6564890)
Every fiber-blocking operation eventually ends up with a call to Fiber.park(). If you want to call park in your function or call a function that calls park etc., you need to let Quasar know that your function is "suspendable". There are several ways to do that: you can declare to throw a SuspendExecution exception, you can annotate your method with a @Suspendable annotation, or you could declare it as suspendable programmatically or in an external text file.
[ Parent
| on HN ]
Re:No More Callbacks: 10,000 Actors, 10,000 Threads, 10,000 ...
by tuxychandru on Thursday October 17, 2013 @08:45AM
(#6564970)
Ah, so I cannot just use any Java library that performs IO if I have to get quasar's benefits.
Re:No More Callbacks: 10,000 Actors, 10,000 Threads, 10,000 ...
by pron on Thursday October 17, 2013 @09:31AM
(#6565196)
Correct, but we'll provide implementations for the most popular IO APIs (NIO, REST services, web sockets, JDBC etc.) so it is a limitation, but I think it's a small one.
Once the documentation is complete you'll know how to transform any callback-based asynchronous call into a fiber-blocking one, so you could integrate your own libraries with Quasar. It's very-very simple.