Working with Asynchrony Generically: A Tour of C++ Executorsfirst, a sad story about a boy and ☹ the greatest keyboard ever made….82 The mission: Write a program that monitors the entire system for keyboard events and plays Model M clicky sounds.83 MODEL MODEL M SIMULATOR: STRATEGY 1. Model a key click as a sender 2. Model keyboard input as a range of senders 3. Model interrupt (e.g., Ctrl-C) as a sender 4. Asynchronously transform range of senders sender85 MODEL KEYCLICK AS SENDER: STRATEGY 1. Assume system API for registering keyboard callback 2. Write a keyboard sender and op state such that: • ...the sender’s connect() returns the op state0 码力 | 121 页 | 7.73 MB | 6 月前3
共 1 条
- 1













