Product Site

5.1.2.8. messageComplete

This method implements the MessageNotification interface. It will be called whenever a message completes processing, for which notification was requested by using the notify method with a message object as the notification target.

As a result of receiving such a notification, messageComplete will send the receiving message to start processing. Any source argument will be ignored.

See also class MessageNotification.

Example 5.21. Message class — messageComplete method
msg = .Message~new(.Array~new(1000)~fill(0)~allIndexes, "sort")
msg~notify(.Message~new(.stdout, "say", "I", "sorting complete"))
msg~notify(.Message~new(.r~new, "items", "I", msg))
msg~start
say "processing continues"

::class r
::method items
use strict arg m
say m~target~items "items sorted"

will output
processing continues
sorting complete
1000 items sorted