# Type-stable mixed PriorityQueues

**URL:** <https://discourse.julialang.org/t/type-stable-mixed-priorityqueues/1549>\
**Category:** General Usage\
**Created:** [January 17, 2017, 7:43pm UTC](https://discourse.julialang.org/t/type-stable-mixed-priorityqueues/1549 "2017-01-17T19:43:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dharasim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dharasim/32/3579_2.png) [@dharasim](https://discourse.julialang.org/u/dharasim)\
**Post date:** [January 17, 2017, 7:43pm UTC](https://discourse.julialang.org/t/type-stable-mixed-priorityqueues/1549/1 "2017-01-17T19:43:23Z")

</div>

Hello,

I want to implement an algorithm that uses a priority queue of objects of various types. Does anybody knows a julia way to implement this so that the dequeuing function is type stable?

How bad will the performance be if I parameterize the priority queue with an union type?

I’m thankful for any advise!
