@@ -5,13 +5,13 @@ struct Event <: AbstractEvent
55 end
66end
77
8- function succeed (ev:: Event ; priority:: Number = 0 , value:: Any = nothing ) :: Event
8+ function succeed (ev:: Event ; priority= 0 , value= nothing ) :: Event
99 state (ev) != = idle && throw (EventNotIdle (ev))
10- schedule (ev; priority= priority, value = value)
10+ schedule (ev; priority= Int ( priority), value)
1111end
1212
13- function fail (ev:: Event , exc:: Exception ; priority:: Number = 0 ) :: Event
14- succeed (ev; priority= priority, value= exc)
13+ function fail (ev:: Event , exc:: Exception ; priority= 0 ) :: Event
14+ succeed (ev; priority= Int ( priority) , value= exc)
1515end
1616
1717struct Timeout <: AbstractEvent
@@ -21,8 +21,8 @@ struct Timeout <: AbstractEvent
2121 end
2222end
2323
24- function timeout (env:: Environment , delay:: Number = 0 ; priority:: Number = 0 , value:: Any = nothing )
25- schedule (Timeout (env), delay; priority= priority, value = value)
24+ function timeout (env:: Environment , delay:: Number = 0 ; priority= 0 , value:: Any = nothing )
25+ schedule (Timeout (env), delay; priority= Int ( priority), value)
2626end
2727
2828function run (env:: Environment , until:: Number = Inf )
0 commit comments