04-20-2020 10:19 AM
Hello everybody,
I'm developing a driver for mongodb in top of mongo c driver. The question is that the mongo c driver isn't thread safe, so I should execute it in the UI thread, which isn't convinient.
I have found posts about how to limit the number of threads in some "execution system" (like other 1 or other 2), and then wrap the DLLs in subVIs that execute in the modified execution system. But that sounds a little bit tricky. You have to configure each Labview instance & executable where you want to execute the driver. And there isn't room for multithreading.
There is a way to, during runtime, keep the thread of the fist execution of the DLL and then use it for the next calls?
Thanks for your time, best regards,
EMCCi
04-20-2020 10:36 AM
Hello everybody,
I have a DLL (mongo-c-driver) that has functions like this that asks for the address of a uninitialized variable: "child
MUST be an uninitialized bson_t to avoid leaking memory."
In a tutorial is used like this:
bson_t child;
bson_append_document_begin (..., &child)
How I can reproduce this in labview?
Thanks for your time,
EMCCi
04-20-2020 10:42 AM
@EMCCi wrote:
There is a way to, during runtime, keep the thread of the fist execution of the DLL and then use it for the next calls?
I don't think there is a way to do that.
I'd look at C\C++\OS ways to do this. For instance, pass a pointer to class with a mutex and a conditional variable, and pass it along the parameters to each function...