Open andre-merzky opened 1 year ago
Our example codes and virtually all application codes currently use the same sequence for application initialization:
session = rp.Session() tmgr = rp.TaskManager(session) pmgr = rp.PilotManager(session) pilot = pmgr.submit_pilots(...) tmgr.add_pilots(pilot) tasks = tmgr.submit_tasks(...) tmgr.wait_tasks()
With a backward-compatible addition of two calls to the rp.Session() object, that initialization can be significantly simplified to:
rp.Session()
session = rp.Session() pilot = session.submit_pilots(...) tasks = session.submit_tasks(...) session.wait_tasks()
In the most common use case, the application does not even need the pilot and task handles, thus further simplifying to:
session = rp.Session() session.submit_pilots(...) session.submit_tasks(...) session.wait_tasks()
The session would internally hold a private PilotManager and TaskManager and simply proxy those calls.
PilotManager
TaskManager
Our example codes and virtually all application codes currently use the same sequence for application initialization:
With a backward-compatible addition of two calls to the
rp.Session()
object, that initialization can be significantly simplified to:In the most common use case, the application does not even need the pilot and task handles, thus further simplifying to:
The session would internally hold a private
PilotManager
andTaskManager
and simply proxy those calls.