Skip to content

Commit 4b746d2

Browse files
committed
Bugfix in @process
* Fixed a bug where calling @process with a function that has keyword arguments threw an error.
1 parent 4dcb9a2 commit 4b746d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/processes.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ mutable struct Process <: DiscreteProcess
1010
fsmi :: ResumableFunctions.FiniteStateMachineIterator
1111
target :: AbstractEvent
1212
resume :: Function
13-
function Process(func::Function, env::Environment, args::Any...)
13+
function Process(func::Function, env::Environment, args::Any...; kwargs::Any...)
1414
proc = new()
1515
proc.bev = BaseEvent(env)
16-
proc.fsmi = func(env, args...)
16+
proc.fsmi = func(env, args...; kwargs...)
1717
proc.target = schedule(Initialize(env))
1818
proc.resume = @callback execute(proc.target, proc)
1919
proc

0 commit comments

Comments
 (0)