The IDLAsyncBridgeTaskJob class encapsulates the combined behaviors of its base classes IDLAsyncBridgeJob and IDLTaskJob. It allows the user to specify a single IDLTask that will be executed inside an IDL_IDLBridge when there are available resources. The IDLTask must have all of its input parameters specified before creating this job, as it will be cloned and dehydrated for passage to the bridge via IDL_IDLBridge::SetVar.
Superclasses
Examples
mainURL = 'https://eoimages.gsfc.nasa.ghtml/images/imagerecords/149000/'
files = [ '149538/cropsfranceground_gedi_2019_lrg.jpg', $
'149554/antarctic_meteorites_2022_lrg.jpg', $
'149502/salardeuyuni_tmo_202250_lrg.jpg', $
'149518/northatlantic_alan_04_lrg.jpg' ]
localFolder = FilePath(datasetName, /TMP)
if (~File_Test(localFolder)) then File_MkDir, localFolder
oJoin = IDLAsyncJoin()
oQueue = IDLAsyncQueue(CONCURRENCY=2)
jobs = ObjArr(N_Elements(files))
task = IDLTask('Download_S3_URL')
foreach file, files, i do begin
task.S3_URL = mainURL + file
task.LOCAL_FILE = FilePath(File_Basename(file), ROOT=localFolder)
jobs[i] = IDLAsyncBridgeTaskJob(task, JOIN=oJoin)
endforeach
oQueue.SubmitJob, jobs
oJoin.WaitForJoin
Syntax
Result = IDLAsyncBridgeTaskJob(Task [, INIT_COMMAND=String] [, JOIN=IDLAsyncJoin])
Arguments
Task
A scalar IDLTask object owned by this job, which will be executed inside an IDL_IDLBridge when Start is called.
Keywords
INIT_COMMAND (optional)
A scalar string of IDL code to be executed inside the bridge when it is initialized.
JOIN (optional)
An IDLAsyncJoin object that is passed to IDLAsyncJob base class Init() method for handling.
Methods
Properties
IDLAsyncBridgeTaskJob inherits all properties from IDLAsyncBridgeJob and IDLTaskJob.
IDLAsyncBridgeTaskJob::OnDone
The IDLAsyncBridgeTaskJob::OnDone method is an implementation override of IDLAsyncJob callback invoked on this job by the Done event handler. The basic sequence of operations follows:
- Call GetReturnValue to get the dehydrated form of the executed task.
- Rehydrate the task.
- Call UpdateTask to store updated task.
- Call IDLAsyncJob::OnDone.
Syntax
IDLAsyncBridgeTaskJob.OnDone
Arguments
None
Keywords
None
Version History
See Also
IDLAsyncBridgeJob, IDLAsyncJob, IDLAsyncJoin, IDLTaskJob