Skip to content

Commit 646018f

Browse files
committed
Fix PriorityQueue deprecation
1 parent 5269c50 commit 646018f

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/resources/containers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mutable struct Container{N<:Number} <: AbstractResource
1212
put_queue :: DataStructures.PriorityQueue{Put, ContainerKey{N}}
1313
get_queue :: DataStructures.PriorityQueue{Get, ContainerKey{N}}
1414
function Container{N}(env::Environment, capacity::N, level::N) where {N<:Number}
15-
new(env, capacity, level, zero(UInt), DataStructures.PriorityQueue(Put, ContainerKey{N}), DataStructures.PriorityQueue(Get, ContainerKey{N}))
15+
new(env, capacity, level, zero(UInt), DataStructures.PriorityQueue{Put, ContainerKey{N}}(), DataStructures.PriorityQueue{Get, ContainerKey{N}}())
1616
end
1717
end
1818

src/resources/stores.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mutable struct Store{T} <: AbstractResource
1919
put_queue :: DataStructures.PriorityQueue{Put, StorePutKey{T}}
2020
get_queue :: DataStructures.PriorityQueue{Get, StoreGetKey}
2121
function Store{T}(env::Environment, capacity::UInt) where {T}
22-
new(env, capacity, Set{T}(), zero(UInt), DataStructures.PriorityQueue(Put, StorePutKey{T}), DataStructures.PriorityQueue(Get, StoreGetKey))
22+
new(env, capacity, Set{T}(), zero(UInt), DataStructures.PriorityQueue{Put, StorePutKey{T}}(), DataStructures.PriorityQueue{Get, StoreGetKey}())
2323
end
2424
end
2525

src/simulations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mutable struct Simulation <: Environment
2525
sid :: UInt
2626
active_proc :: Nullable{AbstractProcess}
2727
function Simulation(initial_time::Number=zero(Float64))
28-
new(initial_time, DataStructures.PriorityQueue(BaseEvent, EventKey), zero(UInt), zero(UInt), Nullable{AbstractProcess}())
28+
new(initial_time, DataStructures.PriorityQueue{BaseEvent, EventKey}(), zero(UInt), zero(UInt), Nullable{AbstractProcess}())
2929
end
3030
end
3131

test/containers.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
workspace()
2-
31
using SimJulia
42
using ResumableFunctions
53

0 commit comments

Comments
 (0)