Bug 1859 - synchronous version of refresh
Summary: synchronous version of refresh
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 1788
  Show dependency treegraph
 
Reported: 2005-11-11 19:10 UTC by Andrew Cagney
Modified: 2006-11-28 16:44 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2005-11-11 19:10:24 UTC
To simplify scripting, add an apparently synchronous version of refresh.
Comment 1 Andrew Cagney 2006-01-31 18:38:23 UTC
well I guess there is kind of good news; I've figured out how to do this (also
for Task.requestAddXxxObserver).  For every observable:observer pair there is
now an Observation object.  The synchronized version could block on that object,
and then when the core has finished processing, unblock it vis:

xxxx()
   Observation o = new observation (....)
   send observation to event loop
   return o.wait ()
   
  The only restriction is that the method not be called by the EventLoop thread
- instant deadlock.

Having this will also likely make scripts easier vis:

main ()
{
  Host = new LinuxHost ();
  host.refresh ();
  for (task in host.getTasks ())
    task.so something;
}

of course this isn't an ok for the gui, that needs to be more agressive and use
the async mechanisms.