|
Suppose I have some class which has a property actor_ of type Actor . Is there a problem with me doing
def someMethod() = { actor_ ! "HELLO" }
Or should sending a message always be done from another actor; e.g.
def someMethod() = { Actor.actor { actor...
Started by oxbow_lakes on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
When you send a message to an actor from non-actor code....
It depends.
At the pure actor model everything is an actor and only actors are communicatinng with each other messages from non-actors to actors.
|
|
Given I invoke an actor from inside react does this block the calling Actor or is it still processing other requests?
class worker extends Actor() { def act() = { loop { react { msg => var foo = another_actor !? 'bar' //Block here? println(foo) } }...
Started by Sebastian on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
An actor about the fact that actors....
The main idea of actors is a single thread of execution .
If it is invoke in middle of actor react block, the calling actor is blocked as well.
Always blocks the calling thread.
|
|
Actor/Movie/Actor game
Totally stole this from another board I'm on.
Alternate posting an actor or movie one post at a time.
Post an Actor/Actress Next person posts a movie said actor/actress was in Person after posts a different actor/actress from said...
Started by RiveriaRed on
, 30 posts
by 5 people.
Answer Snippets (Read the full thread at chubbyparade):
Let's see if I don't screw this up.
|
Ask your Facebook Friends
|
Simple question. Can I do this:
object Xyz extends Actor { ... }
or do Actors have to be classes with instances?
Started by Joe on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Perhaps you forgot to start the actor? (That's a mistake....
Object extending Actor works fine.
I would will run in a separate thread to conclusion .
So yes, that code will be fine - Xyz will be a reference to an object that is an Actor.
|
|
Anyone know of a good way to unit test Scala actors? In the general sense I have an actor that receives a message and will send out other messages in response. This is done on multiple threads, and an actor that is not correct may either send the wrong...
Answer Snippets (Read the full thread at stackoverflow):
You will of course need to ensure that this mock... .
Just create an actor which receives the desired message and you're home free.
Because of the dynamic nature of actor-style message passing, mocking actors is usually no trouble at all.
|
|
The girls fighting about his acting skills in the LOAL thread got me thinking.
I don't rate him as an actor. I don't like Con Air or Face Off or most of the other crap he's been in.
BUT I loved Lord of War and really enjoyed Knowing.
Answer Snippets (Read the full thread at gpforums):
Plus you gotta love his spaz outs....
---
DevilsAdvocate Angry.
I liked Lord of War as well and I'm sure there were others he an excellent actor, he doesn't need to pick and choose his films to prove that.
No doubt that he is an AMAZING actor.
|
|
If A is extension use case (not base use case), can A be directly referenced by the actor?
Answer Snippets (Read the full thread at stackoverflow):
It make sense that the Actor could reference either..
Yes; the fact Steering Based Vehicle.
Concrete -- experienced by an actor.
By an actor, but extensions ("subclasses") are.
|
|
Basically I will have list of Directors and Actors defined in an xml for each Movie type instance.
What type should I use to define the collection? ( Built-in from the BCL or custom ?)
Should I use strings for Directors and Actors or define specific Director...
Started by Joan Venge on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
So I would simply have a class Person, that is the ... .
I see no specific properties of Director or Actor, they are just people.
I would definitely look at the built enhancements.
Need to store both the character name and the actor's name.
|
|
I have an existing java/scala application using a global thread pool. I would like to start using actors in the project but would like everything in the app using the same pool.
I know I can set the maximum number of threads that actors use but would ...
Started by agilefall on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Firstly you can control it's size:
-Dactors.maxPoolSize=8
And you can.
// git yer used by the actor subsystem.
I believe you can do something like this:
trait MyActor extends Actor { val pool = ...
|
|
Is there a way to monitor how many threads are actually alive and running my scala actors ?
Started by paradigmatic on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Subsystem as, by default, the actor threads do not have actor- or scala-specific names (they may.
|