rxada_0.1.0_6ff779c7/src/body/rx-dispatchers-immediate.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
package body Rx.Dispatchers.Immediate is

   --------------
   -- Schedule --
   --------------

   overriding procedure Schedule
     (Where : in out Dispatcher;
      What  : Runnable'Class;
      Time  : Ada.Calendar.Time := Ada.Calendar.Clock)
   is
      pragma Unreferenced (Where);
   begin
      if Time > Ada.Calendar.Clock then
         raise Constraint_Error with "Future scheduling in immediate scheduler not allowed";
      end if;
      What.Run;
   end Schedule;

end Rx.Dispatchers.Immediate;