mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05:00
Add a mini-rant to the top comment explaining why threads are
required. (I just tried getting rid of them; it worked fine for serial ports, but not for anything else. The Windows I/O API sucks.) [originally from svn r6843]
This commit is contained in:
parent
de84239159
commit
33e827818a
@ -16,6 +16,17 @@
|
|||||||
* write; so the output thread waits for an event object notifying
|
* write; so the output thread waits for an event object notifying
|
||||||
* it to _attempt_ a write, and then it sets an event in return
|
* it to _attempt_ a write, and then it sets an event in return
|
||||||
* when one completes.
|
* when one completes.
|
||||||
|
*
|
||||||
|
* (It's terribly annoying having to spawn a subthread for each
|
||||||
|
* direction of each handle. Technically it isn't necessary for
|
||||||
|
* serial ports, since we could use overlapped I/O within the main
|
||||||
|
* thread and wait directly on the event objects in the OVERLAPPED
|
||||||
|
* structures. However, we can't use this trick for some types of
|
||||||
|
* file handle at all - for some reason Windows restricts use of
|
||||||
|
* OVERLAPPED to files which were opened with the overlapped flag -
|
||||||
|
* and so we must use threads for those. This being the case, it's
|
||||||
|
* simplest just to use threads for everything rather than trying
|
||||||
|
* to keep track of multiple completely separate mechanisms.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user