class interface READY_DESCRIPTION
-- Mainly used by loop_item and jobs.
-- May be useful for time/date waiting.
-- May be useful to check if data are available in files without locking.
-- Have a look at queryable for the two states.
creation
make
ensure
queryable = False
feature(s) from READY_DESCRIPTION
queryable: BOOLEAN
-- First this object is not queryable. You have to configure
-- the condition you want to wait for (data on file,
-- timeout...) When configuration is done, you start waiting
-- with wait. Then this object is queryable, that mean
-- that you can query the state of files, using is_data
-- and is_free.
reset
ensure
queryable = False
after (timeout_ms: INTEGER)
-- timeout_ms is the max time in milliseconds to wait when
-- wait begin.
require
timeout_ms >= 0;
not queryable
after_from_now (timeout_ms: INTEGER)
-- timeout_ms is the max time in milliseconds to wait from now.
require
timeout_ms >= 0;
not queryable
at (date: MICROSECOND_TIME)
-- date is the last moment wait can wait.
require
not queryable
when_data (file: INPUT_WATCHED_FILE)
require
file /= Void;
file.is_connected;
not queryable
is_data (file: INPUT_WATCHED_FILE): BOOLEAN
require
file /= Void;
file.is_connected;
queryable
when_free (file: OUTPUT_WATCHED_FILE)
require
file /= Void;
file.is_connected;
not queryable
is_free (file: OUTPUT_WATCHED_FILE): BOOLEAN
require
file /= Void;
file.is_connected;
queryable
wait
-- block until requested condition (max time and/or data)
require
not queryable
ensure
queryable
feature(s) from READY_DESCRIPTION
current_time: MICROSECOND_TIME
feature(s) from READY_DESCRIPTION
current_time_update
-- (Because current_time is an expanded.)
end of READY_DESCRIPTION