My example was meant to illustrate why sending functions to actors is
dangerous.
On Saturday, August 22, 2015 at 1:04:14 PM UTC-6, kraythe wrote:
>
> Sure this would be one idea. I guess the question revolves around whether
> it is good practice in reactive programming.
>
> On Saturday, August 22, 2015 at 11:28:01 AM UTC-5, Ryan Tanner wrote:
>>
>> case class SmartMessage(data: String, fn: String => Unit)
>>
>>
>> var mutableState: String = "this can change"
>>
>>
>> remoteActor ! SmartMessage("some data", x => println(x + mutableState))
>>
>>
>>
>>
>> On Saturday, August 22, 2015 at 8:12:02 AM UTC-6, kraythe wrote:
>>>
>>> I don't know what you mean by that. Callable or function implementation
>>> doesn't need to be serializable, only the data packaged with the message
>>> needs to be. In my example everything is imminently serializable. I'm
>>> simply packaging implementation with message data
>>
>>
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> 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/d/optout.