The code generator automatically generates a set of scheduler data
structures and functions for each asynchronous connection between
actors. For each input port of an actor, the code generator generates a
queue of length n, where n is specified in the application definition.
The width of the queue depends on the number of arguments of the
method connected to the port. If there are no arguments, then as
an optimization, no queue is generated for the port (but space is still
reserved for events in the scheduler event queue).
For each output port of an actor, the code generator generates a
function that has the same name as the output port. This function
is called whenever a method of a component wishes to write to an
output port. The type signature of the output port function matches
that of the method that connects to the port. For each input port
connected to the output port, a put() function is generated which
handles the actual copying of data to the input port queue. The
output port function calls the input port’s put() function for each
connected input port. The put() function adds the port identifier to
the scheduler event queue so that the scheduler will activate the actor
at a later time.
The code generator automatically generates a set of scheduler data
structures and functions for each asynchronous connection between
actors. For each input port of an actor, the code generator generates a
queue of length n, where n is specified in the application definition.
The width of the queue depends on the number of arguments of the
method connected to the port. If there are no arguments, then as
an optimization, no queue is generated for the port (but space is still
reserved for events in the scheduler event queue).
For each output port of an actor, the code generator generates a
function that has the same name as the output port. This function
is called whenever a method of a component wishes to write to an
output port. The type signature of the output port function matches
that of the method that connects to the port. For each input port
connected to the output port, a put() function is generated which
handles the actual copying of data to the input port queue. The
output port function calls the input port’s put() function for each
connected input port. The put() function adds the port identifier to
the scheduler event queue so that the scheduler will activate the actor
at a later time.
การแปล กรุณารอสักครู่..
