Perhaps this is a naive question:
Do you need a separate method?  Could the start method not just always
return such an instance.  The difference then being whether the instance is
used or not?

Jon

On 14 October 2014 15:01, Rick McGuire <[email protected]> wrote:

> I've just started pounding on the .Message class and decided to revisit
> this one.  Looking at the code, there is nothing in a message object that
> would preclude them being invoked more than once, EXCEPT for the start()
> method.  This is because message objects are actually serving two
> purposes.  The first function is acting as a proxy for invoking a method
> dynamically.  The second purpose is to provide access to methods that have
> been invoked asynchronously.  With 20-20 hindsight, it is obvious this
> should have been implemented as two separate classes, where the start()
> method would return an instance of the second class to track the
> execution.  This is essentially how the Object start() method uses message
> objects.
>
> I'd like to relax the reuse restriction a bit so that reuse is only
> forbidden once the message object has been used asynchronously.  Send() can
> be called over and over.  Start() can be called only once.  However, I'd
> also like to add another method that that will run the method
> asynchronously and return a new message object instance for running the
> method.  Any suggestions on a name?  spawn() or fork() come to mind,
> although I'm really not that fond of fork(), and not that particularly fond
> of spawn either. Anybody clever enough to come up with a better name?
>
> Rick
> ---------- Forwarded message ----------
> From: Rick McGuire <[email protected]>
> Date: Tue, Oct 14, 2014 at 9:53 AM
> Subject: [oorexx:feature-requests] #245 Allow message objects to be
> triggered more than once.
> To: "[oorexx:feature-requests]" <[email protected]>
>
>
> - **status**: open --> accepted
> - **assigned_to**: Rick McGuire
> - **Pending work items**:  --> code+doc+test
> - **Milestone**: None --> 5.0.0
>
>
>
> ---
>
> ** [feature-requests:#245] Allow message objects to be triggered more than
> once.**
>
> **Status:** accepted
> **Milestone:** 5.0.0
> **Labels:** Classes
> **Created:** Thu Sep 27, 2007 08:44 PM UTC by Rick McGuire
> **Last Updated:** Wed Aug 22, 2012 07:54 PM UTC
> **Owner:** Rick McGuire
>
> For some types of applications, it would be useful to have a form of
> message object that can be triggered more than one time.  For example, if
> you wanted to trigger an action whenever an event occurs, it would be more
> useful to attach the message object to an event handler and allow the call
> to be triggered on each event.  Currently, the message object is one use
> and out.
>
>
> ---
>
> Sent from sourceforge.net because you indicated interest in <
> https://sourceforge.net/p/oorexx/feature-requests/245/>
>
> To unsubscribe from further messages, please visit <
> https://sourceforge.net/auth/subscriptions/>
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to