Is CAN_Initialize thread safe?

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
tr.gt
Posts: 12
Joined: Mon 7. Sep 2015, 13:43

Is CAN_Initialize thread safe?

Post by tr.gt » Thu 14. Jan 2016, 09:18

Hey,

I'm currently have problems with CAN_Initialize calling from another thread.

I wrapped the PCAN Basic function in my own class and call CAN_Initialize in the constructor.

If create the class in my main thread everything works fine. If I start another thread to create a instance the thread exists at CAN_Initialize.

Do I need to regard something for threading?

Thanks,
Tobias

K.Wagner
Software Development
Software Development
Posts: 1080
Joined: Wed 22. Sep 2010, 13:36

Re: Is CAN_Initialize thread safe?

Post by K.Wagner » Thu 14. Jan 2016, 09:38

Hello,

yes, all PCAN-Basic functions are indeed thread safe. Please check if members of your class that are possibly being used at initialize time are thread safe as well.
Best regards,
Keneth

Post Reply