summaryrefslogtreecommitdiff
path: root/source/helpers/mu-threads
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-12-15 19:05:53 +0000
committerRobin Watts <robin.watts@artifex.com>2016-12-19 12:56:50 +0000
commit247fda9a136ff14a33aef4c3b7404a04cf3d3752 (patch)
tree584181d4b06f5763e931011c3ed687c23be424b8 /source/helpers/mu-threads
parent1c3463c27470783a5b6807a91628a71f33b91090 (diff)
downloadmupdf-247fda9a136ff14a33aef4c3b7404a04cf3d3752.tar.xz
Add MuOfficeLib functions to safely run native MuPDF ops.
It seems likely that we'll want people to able to use the MuPDF C API as well as the MuOfficeLib helper lib. We therefore need a way to get fz_context and fz_document values out of MuOfficeLib. Potential problems exist with people calling MuPDF C API functions using an fz_context that is in use elsewhere. Similarly, if an fz_document is in use in a background thread (for instance in a page render), we need to ensure that it can't be used at the same time elsewhere. We therefore provide MuOffice{Lib,Doc,Page}_run functions that allow this to happen safely. This largely insulates callers from the complexities of having to clone contexts etc, it safely ensures that exceptions cannot be propogated beyond the topmost fz_try/ fz_catch, and it ensures that appropriate locking is used.
Diffstat (limited to 'source/helpers/mu-threads')
0 files changed, 0 insertions, 0 deletions