88 */
99
1010import type { UpdateQueue as HookQueue } from './ReactFiberHooks.new' ;
11- import type { SharedQueue as ClassQueue } from './ReactUpdateQueue .new' ;
11+ import type { SharedQueue as ClassQueue } from './ReactFiberClassUpdateQueue .new' ;
1212
1313// An array of all update queues that received updates during the current
1414// render. When this render exits, either because it finishes or because it is
1515// interrupted, the interleaved updates will be transferred onto the main part
1616// of the queue.
17- let interleavedQueues : Array <
17+ let concurrentQueues : Array <
1818 HookQueue < any , any > | ClassQueue < any > ,
1919> | null = null ;
2020
21- export function pushInterleavedQueue (
21+ export function pushConcurrentUpdateQueue (
2222 queue : HookQueue < any , any > | ClassQueue < any > ,
2323) {
24- if ( interleavedQueues === null ) {
25- interleavedQueues = [ queue ] ;
24+ if ( concurrentQueues === null ) {
25+ concurrentQueues = [ queue ] ;
2626 } else {
27- interleavedQueues . push ( queue ) ;
27+ concurrentQueues . push ( queue ) ;
2828 }
2929}
3030
31- export function enqueueInterleavedUpdates ( ) {
31+ export function finishQueueingConcurrentUpdates ( ) {
3232 // Transfer the interleaved updates onto the main queue. Each queue has a
3333 // `pending` field and an `interleaved` field. When they are not null, they
3434 // point to the last node in a circular linked list. We need to append the
3535 // interleaved list to the end of the pending list by joining them into a
3636 // single, circular list.
37- if ( interleavedQueues !== null ) {
38- for ( let i = 0 ; i < interleavedQueues . length ; i ++ ) {
39- const queue = interleavedQueues [ i ] ;
37+ if ( concurrentQueues !== null ) {
38+ for ( let i = 0 ; i < concurrentQueues . length ; i ++ ) {
39+ const queue = concurrentQueues [ i ] ;
4040 const lastInterleavedUpdate = queue . interleaved ;
4141 if ( lastInterleavedUpdate !== null ) {
4242 queue . interleaved = null ;
@@ -50,6 +50,6 @@ export function enqueueInterleavedUpdates() {
5050 queue . pending = ( lastInterleavedUpdate : any ) ;
5151 }
5252 }
53- interleavedQueues = null ;
53+ concurrentQueues = null ;
5454 }
5555}
0 commit comments