forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita948e49
committed
Use nanosleep() to implement pg_usleep().
The previous coding based on select() had commentary about historicalportability concerns. Use POSIX nanosleep() instead.This has independently been suggested a couple of times before, butnever managed to stick. Since recent and proposed work removes otheruses of select(), and associated code and comments relating to itsnon-portable interaction with signals, it seems like a good time to tidyup this case, too.Also modernize the explanation of why WaitLatch() is a better way towait.Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Suggested-by: Paul Guo <paulguo@gmail.com>Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CAAKRu_b-q0hXCBUCAATh0Z4Zi6UkiC0k2DFgoD3nC-r3SkR3tg%40mail.gmail.comDiscussion:https://postgr.es/m/CABQrizfxpBLZT5mZeE0js5oCh1tqEWvcGF3vMRCv5P-RwUY5dQ@mail.gmail.comDiscussion:https://postgr.es/m/4902.1552349020@sss.pgh.pa.us1 parente4da2a4 commita948e49
1 file changed
+10
-15
lines changedLines changed: 10 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
| 15 | + | |
18 | 16 |
| |
19 | 17 |
| |
20 | 18 |
| |
| |||
32 | 30 |
| |
33 | 31 |
| |
34 | 32 |
| |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
44 | 39 |
| |
45 | 40 |
| |
46 | 41 |
| |
47 | 42 |
| |
48 | 43 |
| |
49 | 44 |
| |
50 | 45 |
| |
51 |
| - | |
| 46 | + | |
52 | 47 |
| |
53 | 48 |
| |
54 |
| - | |
55 |
| - | |
| 49 | + | |
| 50 | + | |
56 | 51 |
| |
57 | 52 |
| |
58 | 53 |
| |
|
0 commit comments
Comments
(0)