I am working with a serial port to talk to hardware, from multiple threads. I need a critical section to make sure commands and responses are matched. Some write operations take a long time while I wait for the hardware to respond. Query operations to the hardware are low priority and I don't want them to wait for the long write operation, so TryEnterCriticalSection will be helpful for the queries.