We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdeb08a commit 3e69187Copy full SHA for 3e69187
1 file changed
src/hx/concurrent/collection/SynchronizedLinkedList.hx
@@ -125,6 +125,7 @@ private class SynchronizedLinkedListImpl<T> implements OrderedCollection<T> {
125
}
126
if (idx == 0) {
127
items.push(x);
128
+ _items = items;
129
return;
130
131
@@ -133,8 +134,10 @@ private class SynchronizedLinkedListImpl<T> implements OrderedCollection<T> {
133
134
for (item in _items) {
135
i++;
136
- if (i == idx)
137
+ if (i == idx) {
138
items.add(x);
139
+ inserted = true;
140
+ }
141
items.add(item);
142
143
if (!inserted)
@@ -181,7 +184,7 @@ private class SynchronizedLinkedListImpl<T> implements OrderedCollection<T> {
181
184
if(i == idx)
182
185
removed = item;
183
186
else
- _items.add(item);
187
+ items.add(item);
188
189
190
_items = items;
0 commit comments