- Topics - 3
- Replies - 66
- Total Posts - 69
Wow, a 4+ year-old thread revived.
The TWAIN spec doesn’t seem to cover reentrancy or multithreading. Note that messages may be posted to the wrong message queue if TWAIN is called from a thread other than the one which owns its window. This can result in unresponsive UI or deadlocks (e.g. XFERREADY is never received). For maximum compatibility a process should make all TWAIN calls from a single thread: the one that owns the parent window provided to TWAIN. The thread that calls TWAIN does not have to be the app’s main UI thread; it can be a worker thread with it’s own message loop.