[saga-rg] Task model...

'Andre Merzky' andre at merzky.net
Tue Nov 8 22:17:15 CST 2005


Hmm, I thought so as well, you know.  But actually, error
conditions are flagged by excptions, so we would not return
errors anyway.  So it does not matter if e.g.  mkdir_sync ()
returns a task: it would not be used anyway. (If the task
gets returned it is Finished.  If it failes, an error is
thrown.)

OTOH, for calls which do return infos this is different:
directory.ls ();  would normally return a list of strings  I
guess.  With the proposed model, the list would need to be
returned in I/O parameters, such as:

 std::list<string> l;
 d.ls_sync (&l);

So, the problems are not error conditions, but return values
I guess.  

However, similar considerations hold for the other task
models: at least the signature of the method calls might
look different for synchroneous and asynchroneous calls:

  sync in version B:

    std::list<string> l = d.sync.ls ();

  async in version B:
  
    std::list<string> l;
    saga::task t = d.sync.ls (&l);

I created some more verbose examples at 

  http://wiki.cct.lsu.edu/saga/space/Task+Models

(see bottom of page) -- I hope that helps the discussion.
Feel free to change/edit/correct them, and in fact to edit
that page.

Again: the cuurent discussion does ONLY affect the C++
language binding for now!

Cheers, Andre.



Quoting [Hartmut Kaiser] (Nov 08 2005):
> 
> The main question is, do we need to have different return values from
> sync/async operations or not. It's kind of unusual to get a task from a
> 'normal' sync operation, even more because this task is usable for return
> value retrieval only.
> 
> Regards Hartmut


-- 
+-----------------------------------------------------------------+
| Andre Merzky                      | phon: +31 - 20 - 598 - 7759 |
| Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 |
| Dept. of Computer Science         | mail: merzky at cs.vu.nl       |
| De Boelelaan 1083a                | www:  http://www.merzky.net |
| 1081 HV Amsterdam, Netherlands    |                             |
+-----------------------------------------------------------------+





More information about the saga-rg mailing list