Commit f18c40b
committed
src: don't allow parallel calls to Update()
ThreadMetrics::Update() is supposed to be thread-safe, so we need to
guard against calls being made in parallel. Return UV_EBUSY if an
asynchronous Update() is already being processed.
PR-URL: #13
Reviewed-by: Santiago Gimeno <santiago.gimeno@gmail.com>1 parent 2744a99 commit f18c40b
2 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
329 | 334 | | |
330 | 335 | | |
331 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
| |||
976 | 977 | | |
977 | 978 | | |
978 | 979 | | |
| 980 | + | |
979 | 981 | | |
980 | 982 | | |
981 | 983 | | |
982 | 984 | | |
983 | 985 | | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
984 | 991 | | |
985 | | - | |
986 | | - | |
| 992 | + | |
| 993 | + | |
987 | 994 | | |
988 | | - | |
| 995 | + | |
989 | 996 | | |
990 | 997 | | |
991 | 998 | | |
992 | 999 | | |
993 | | - | |
994 | | - | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
995 | 1006 | | |
996 | 1007 | | |
997 | 1008 | | |
| |||
1001 | 1012 | | |
1002 | 1013 | | |
1003 | 1014 | | |
| 1015 | + | |
1004 | 1016 | | |
1005 | 1017 | | |
1006 | 1018 | | |
| |||
0 commit comments