parsl.dataflow.flow_control.Timer

class parsl.dataflow.flow_control.Timer(callback, *args, interval=5, name=None)[source]

This timer is a simplified version of the FlowControl timer. This timer does not employ notify events.

This is based on the following logic :

BEGIN (INTERVAL, THRESHOLD, callback) :
    start = current_time()

    while (current_time()-start < INTERVAL) :
         wait()
         break

    callback()
__init__(callback, *args, interval=5, name=None)[source]

Initialize the flowcontrol object We start the timer thread here

Parameters

dfk (-) – DFK object to track parsl progress

KWargs:
  • threshold (int) : Tasks after which the callback is triggered

  • interval (int) : seconds after which timer expires

  • name (str) : a base name to use when naming the started thread

Methods

__init__(callback, *args[, interval, name])

Initialize the flowcontrol object We start the timer thread here

close()

Merge the threads and terminate.

make_callback([kind])

Makes the callback and resets the timer.

close()[source]

Merge the threads and terminate.

make_callback(kind=None)[source]

Makes the callback and resets the timer.