To be more clear, a call to ibnotify or any other call will not hang indefinitely. Once the IO has completed, either successfully synchronized using ibwait or ibnotify, or aborted using ibstop, the ibnotify call in the other thread will continue down into the driver. In this situation, ibnotify is treated much like any other driver call. I can think of a few situations in which returning an error in this situation would not be ideal for the user.
Imagine that somebody has a multi-threaded application where each thread is responsible for communicating with a different instrument. A user could use device-level calls, and not really have to worry about what the other threads are doing. This is because the NI-488.2 dr
iver handles the synchronization of the two threads for the user. If the driver had returned an error in this situation, the programmer would have to write code to handle the error condition and resubmit the call. The user could potentially eat up a lot of processor overhead by continuously resubmitting the call to the driver while IO is in progress in another thread.
Making such changes to our driver at this point in time could cause quite severe consequences for existing applications. As it is, we've attempted to take the best behavior from our previous drivers in order to provide the highest level of backwards compatibility. We provide an API that is well over ten years old, so changing it can be quite a difficult task. Unfortunately, sometimes the slightest changes can cause big problems. Making drastic changes to such an old API could very easily break applications that have run fine for many years.
We appreciate the feedback, and will look into how we can provide more
in-depth documentation on our multi-process and multi-threaded driver behavior.