This module defines a simple Neuron
which initiates dissolving
after a given delay. It can be used to limit execution time of
the network. You grow
it in Incubation
by using something like:
_ <- (growNeuron :: NerveNone TimeoutNeuron) (\o -> o { timeout = 10000000 })
somewhere among (best at the end) growNeuron
calls for other Neuron
s in Incubation
.
It is an example of a Neuron
which does not live
indefinitely (until an exception) but dissolve
s after some time (by using
dissolving
). It does not process any Impulse
s.
Documentation
data TimeoutNeuron Source
Data TimeoutNeuron | |
Show TimeoutNeuron | |
Typeable TimeoutNeuron | |
Neuron TimeoutNeuron | A simple |
Eq (NeuronOptions TimeoutNeuron) | |
Data (NeuronOptions TimeoutNeuron) | |
Ord (NeuronOptions TimeoutNeuron) | |
Read (NeuronOptions TimeoutNeuron) | |
Show (NeuronOptions TimeoutNeuron) |
type TimeoutFromImpulse = NeuronFromImpulse TimeoutNeuronSource
Impulse
s from TimeoutNeuron
. This Neuron
does not define any Impulse
s it would send, NoImpulse
.
type TimeoutForImpulse = NeuronForImpulse TimeoutNeuronSource
Impulse
s for TimeoutNeuron
. This Neuron
does not define any Impulse
s it would receive, NoImpulse
.
type TimeoutOptions = NeuronOptions TimeoutNeuronSource
Options for TimeoutNeuron
. This option is defined:
timeout ::
Int
- The length of the delay in microseconds before initiating
dissolving
. Default is 60 seconds.