nl_tokens: Inserts multiple rows in a table limiting the amount of parallel requests .
pl_tokens: async function example ( ) { await client . connect ( ) ; await client . execute ( ` ` ) ; await client . execute ( ` ` ) ; await client . execute ( ` ` ) ; // The maximum amount of async executions that are going to be launched in parallel // at any given time const concurrencyLevel = 32 ; const promises = new <mask> ( concurrencyLevel ) ; const info = { totalLength : 10000 , counter : 0 } ; // Launch in parallel n async operations (n being the concurrency level) for ( let i = 0 ; i < concurrencyLevel ; i ++ ) { promises [ i ] = executeOneAtATime ( info ) ; } try { // The n promises are going to be resolved when all the executions are completed. await Promise . all ( promises ) ; console . log ( ` ${ info . totalLength } ${ concurrencyLevel } ` ) ; } finally { client . shutdown ( ) ; } }