Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Error 14912 When Using Thread Safe Queues in LabWindows/CVI

Primary Software: LabWindows/CVI Development Systems>>Full Development System
Primary Software Version: 8.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
Why do I receive Error 14912 when calling CmtWriteTSQData or CmtReadTSQData on a thread safe queue in LabWindows/CVI?

Solution:
The primary purpose of the thread safe queue is to provide data exchange between a single writer thread and a single reader thread.

The documentation for Error 14912 states the following: "This thread or another thread is currently writing to the thread safe queue".

If you attempt to write to a single queue from multiple threads, you will need to serialize the access to the thread from both writers. You can do this easily using the thread lock functions:

CmtNewLock
CmtGetLock
CmtReleaseLock

Refer to the LabWindows/CVI threading shipping examples located in the <CVI>\samples\utility\threading\ directory.

Related Links:

Attachments:





Report Date: 02/19/2007
Last Updated: 03/01/2007
Document ID: 46IK38SN

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit