Differences

This shows you the differences between two versions of the page.

Link to this comparison view

irc:1465250400 [2017/05/27 13:44] (current)
Line 1: Line 1:
 +[15:54:12] <​reisberg>​ Hi all, I'm using the vertx (for Java) with Scala, and I want to use Future inside my routes to respond to clients (inside my Future: rc.response.write ... )
 +
 +[15:54:41] <​reisberg>​ is it threadsafe to do that?
 +
 +[15:55:20] <​Sticky>​ I assume scala runs its own thread pool to run its futures? if so probably not
 +
 +[15:55:30] <​reisberg>​ i see
 +
 +[15:55:53] <​reisberg>​ so that was going to be my next question: how do I get the correct threadpool to run with my Future?
 +
 +[15:58:01] <​reisberg>​ (in vertx'​s user manual, it says that most objects are threadsafe. So, rc is not threadsafe? )
 +
 +[15:59:21] <​Sticky>​ actually that is a good point, I was just making the general statement that vertx'​s concurrency guarentees wont work if you are using your own thread pool, in that specific case it may be fine
 +
 +[15:59:49] <​Sticky>​ I think easiest way is to use vertx.runOnContext
 +
 +[16:00:19] <​Sticky>​ could look at https://​github.com/​vert-x3/​vertx-lang-scala/​blob/​master/​src/​main/​scala/​io/​vertx/​scala/​core/​Future.scala
 +
 +[16:00:26] <​Sticky>​ but that project looks dead
 +
 +[16:01:20] <​reisberg>​ yeah
 +
 +[16:01:28] <​reisberg>​ also, it's not about executioncontext
 +
 +[16:01:55] <​reisberg>​ so if I create my execution context, and my run calls vertx.runOnContext,​ then I'm good?
 +
 +[16:02:56] <​Sticky>​ Should be yes
 +
 +[16:03:09] <​reisberg>​ thanks!!!
 +
 +[16:16:37] <​BadApe>​ i just got a weird error java.nio.file.AccessDeniedException:​ vertx\file-cache-xxx
 +
 +[16:17:08] <​BadApe>​ i deleted .vertx and started again, weirdly enough the directories are created
 +
 +[16:24:01] <​moment-4>​ @BadApe I had something similar... it's possible to disable the creation of that directory (if I remember well). Forgot how to do that, though...
 +
 +[16:40:29] <​BadApe>​ it is weird as this project is not new and nothing changed
 +
 +[18:15:08] <​Noam_>​ Hello, any estimation when 3.3 is going to be released?
 +
 +[18:17:41] <​temporalfox>​ hi Noam_ we should have a milestone this week and we aim a release around 22/06
 +
 +[18:17:45] <​temporalfox>​ that week
 +
 +[18:20:05] <​Noam_>​ Thanks! Looking forward to rediscover geo implementation