Is okFrontPanelDLL thread safe?

Having upgraded everything to 3.1, including my HDL, everything works until I use FrontPanel in a multithreaded application. The old driver worked fine, but now I experience random drop-outs, where the FrontPanel system simply stops.

Additionally, I have to power cycle the FPGA board in order to perform transfers again, although connecting to the device is OK.

My scenario: Polling a WireIn to see if data is available for transfer. The polling occurs in a worker thread.
Using a non-threaded application, all seems fine, but is not a solution for me.
Using Windows 7, MSVC++ 2008.

Now under Fedora 13, all is OK, just slower.


You should not multi-thread any access to the XEM device.

The firmware and driver/API communicate in a sequence and having multiple calls to the hardware interrupt each other can cause problems.

You can (and we recommend) put your FrontPanel interactions in a separate thread. Then, to communicate with your device, you send/receive messages with this thread. This is the most reliable way to communicate with the device. It buys you the reliability and the multithreaded performance you need.