[kepler-dev] PN director and prefire/fire methods

Piotr Domagalski piotr.domagalski at fedstage.com
Wed Mar 18 01:29:43 PDT 2009


On Wed, Mar 18, 2009 at 9:06 AM, Piotr Domagalski
<piotr.domagalski at fedstage.com> wrote:
> On Wed, Mar 18, 2009 at 1:39 AM, Edward A. Lee <eal at eecs.berkeley.edu> wrote
>> In PN, hasToken() always returns true.
>> This is because PN implements Kahn-MacQueen blocking reads,
>> which ensures determinism.
>>
>> I suspect you really want to be using one of the dataflow
>> directors (SDF or DDF).
>
> The thing is that I need parallel execution of actors, so I think I
> need to stick with PN director. How do I then implement what I called
> "input triggered actor" which fires only when data is available on all
> of its connected input ports?

Argh, sorry!

I kind of ignored what you said about blocking reads... now I got it
right - to achieve my goal I just need to get() on the channels and
the actor gets blocked if the channel is connected but there's no
token yet. And TerminateProcessExecption is what is thrown from get()
to let the actor's thread know that it should leave fire().

That makes sense now, thanks!

-- 
Piotr Domagalski


More information about the Kepler-dev mailing list