Your choice. The kernel will buffer input from either device until your app reads it, so no worries about dropping chars unless it gets *really far* behind.

Most people would probably use select() (or poll()) to wait on both fds simultaneously from a single thread.

Cheers