Hi Ömer, this is most probably a question concerning Jedis, not Akka.
Regards, Roland 17 jan 2014 kl. 01:52 skrev Ömer Faruk Gül <[email protected]>: > Hi, > > I have a problem, > > The following two lines (in play2.1) blocks the constructor or preStart: > > Jedis j = > play.Play.application().plugin(RedisPlugin.class).jedisPool().getResource(); > j.subscribe(new MyListener(), CHANNEL); > > Actually in the original example I'm following it was called in an another > thread as follows: > > Akka.system().scheduler().scheduleOnce( > Duration.create(10, TimeUnit.MILLISECONDS), > new Runnable() { > public void run() { > Jedis j = > play.Play.application().plugin(RedisPlugin.class).jedisPool().getResource(); > j.subscribe(new MyListener(), > CHANNEL); > } > }, > Akka.system().dispatcher() > ); > > Why does subscribe blocks the code? What I mean by blocking is the Logging > lines after the j.subscribe(new MyListener(), CHANNEL); line doesn't work. > > Thanks. > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. Dr. Roland Kuhn Akka Tech Lead Typesafe – Reactive apps on the JVM. twitter: @rolandkuhn -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.
