Commit 51ae360
committed
♻️ Add command response handler before command is sent
As far as I can tell, this really isn't necessary: there is no race
condition because the `synchronize` mutex will not be released before
the response handler is added. Nor is it sufficient to protect against
any invalid responses sent previously.
But the code _reads_ more cleanly (to me) when it is written so the
critical window that requires that mutex is as short as possible.1 parent 24d5c77 commit 51ae360
1 file changed
Lines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3639 | 3639 | | |
3640 | 3640 | | |
3641 | 3641 | | |
| 3642 | + | |
3642 | 3643 | | |
3643 | | - | |
3644 | | - | |
3645 | | - | |
3646 | | - | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
| 3644 | + | |
3650 | 3645 | | |
3651 | | - | |
| 3646 | + | |
| 3647 | + | |
3652 | 3648 | | |
3653 | | - | |
3654 | | - | |
3655 | | - | |
| 3649 | + | |
3656 | 3650 | | |
3657 | 3651 | | |
3658 | 3652 | | |
| |||
0 commit comments