Commit 8e9e484
committed
auto merge of #14708 : gereeter/rust/faster-sem, r=alexcrichton
Currently, `Sem`, which is used as a building block for all the blocking primitives, uses a very ugly hack to implement `Share` and be able to mutate the stored `WaitQueue` by hiding it all behind a `transmute`d `*()`. This PR replaces all that ugly machinery with `Unsafe`. Beyond being cleaner and not requiring `transmute`, this removes an allocation in the creation and removes an indirection for access.1 file changed
+8
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 89 | + | |
| 90 | + | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
| |||
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
110 | | - | |
111 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
124 | 119 | | |
125 | | - | |
| 120 | + | |
| 121 | + | |
126 | 122 | | |
127 | 123 | | |
128 | 124 | | |
| |||
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | 162 | | |
177 | 163 | | |
178 | 164 | | |
| |||
0 commit comments