Closed trustmaster closed 9 years ago
Currently GoFlow components are reactive: we program them as reactions to data arriving at inports.
In classical FBP, a component's process is sitting in its own thread receiving data on its inports and sending output in a loop.
Implementing active components in GoFlow is relatively easy but requires some changes to the library:
Loop()
<-
= <-
select
Currently GoFlow components are reactive: we program them as reactions to data arriving at inports.
In classical FBP, a component's process is sitting in its own thread receiving data on its inports and sending output in a loop.
Implementing active components in GoFlow is relatively easy but requires some changes to the library:
Loop()
method which is called in a separate goroutine when the process is activated.Loop()
method it uses Go channel operators (<-
,= <-
andselect
) to receive data from inports, send data to outports, etc.Loop()
is called when the network is started. Non-loopers are currently unsupported in favor of reactive components.