How to know there is instance(libre office) present already

Im using python, Getting issues when i use multi-threading (unable to convert some documents(at a given time) ) . So how should i ensure whether there is only single instance(job running ) of libre in background.
Gone through the docs of soffice(linux- ubuntu) Couldnt find any functionality like that.(Even in unoconv) OR How should i convert documents in batch . # Using multi threading in python to convert documents(doc to pdf) parallel

@yunus: this is related to tdf#120676.

As a temporary workaround, you could use a temporary unique profile directory for each process (see command-line parameters help), so that they don’t conflict with each other. This introduces an overhead to initialize the profile; or to copy a pre-made profile to a temporary location before launching soffice (if you need some settings pre-set in the profile); and also for clean-up afterwards.