In my program on Play 2.0.4 I had this piece of code:
val channel = Enumerator.imperative[JsValue](onStart = self ! NotifyJoin(username))
and now it says that imperative
is deprecated, and the API says that I should use unicast
or broadcast
instead. I tend to use unicast
since in my code the channel
was unicast. So I make like
val channel = Concurrent.unicast[JsValue](onStart = self ! NotifyJoin(username))
But it does not work.. looks like that unicast
wants something else. I cannot figure it out - there is no more info in the API... does anyone know what to do here?
UPDATE:
Started a discussion in Play Framework user group. Turns out to be a pretty common problem among developers, who are knew to the paradigm. Will hope the documentation is going to be improved.