  Handling the ever-increasing complexity of mesh generation codes along with
the intricacies of newer hardware often results in codes that are both
difficult to comprehend and maintain. Different facets of codes such as thread
management and load balancing are often intertwined, resulting in efficient but
highly complex software. In this work, we present a framework which aids in
establishing a core principle, deemed separation of concerns, where
functionality is separated from performance aspects of various mesh operations.
In particular, thread management and scheduling decisions are elevated into a
generic and reusable tasking framework. The results indicate that our approach
can successfully abstract the load balancing aspects of two case studies, while
providing access to a plethora of different execution back-ends. One would
expect, this new flexibility to lead to some additional cost. However, for the
configurations studied in this work, we observed up to 13% speedup for some
meshing operations and up to 5.8% speedup over the entire application runtime
compared to hand-optimized code. Moreover, we show that by using different task
creation strategies, the overhead compared to straight-forward task execution
models can be improved dramatically by as much as 1200% without compromises in
portability and functionality.
