This spawns a print-actor that continually prints the received message and spawns a timer actor which signals it after some time and dies. After setting the machine in motion in the last line you would expect print-actor to print :tick to the console in 1 second intervals, but this does not happen. From my investigation it seems that in this case the timer is spawned correctly and does send the message, only for some reason print-actor doesn't receive it.
As a temporary workaround, turning the do into a let and binding @self to a symbol instead of passing it directly to spawn restored the expected behaviour for me.
I may have come across a bug in a peculiar case I was trying to implement. Take a look at this expression:
This spawns a
print-actor
that continually prints the received message and spawns a timer actor which signals it after some time and dies. After setting the machine in motion in the last line you would expectprint-actor
to print :tick to the console in 1 second intervals, but this does not happen. From my investigation it seems that in this case the timer is spawned correctly and does send the message, only for some reasonprint-actor
doesn't receive it.