You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pool::Submit takes around 0.02sec for each thread. Each iteration of my foreach loop takes 0.002seconds until getting to Pool::Submit line, where time increases 10fold for each iteration, going up from 0.002 to 0.02 average .
Reproducing Code
$ProfilesThreadsPool = new \Pool($ProfilesLimit);
$AllProfilesThreads = [];
$SelectedActivePool = $SelectedProfiles = [];
for ($j = 0; $j < count($OpenTasks); $j++) {
/// Lots of Random Code Before Submitting Thread///
///////////////////////////////////////////////////
$SelectedProfiles = array_merge($SelectedProfiles, array_column($ChunkedProfiles, 'id'));
$CurrentProfileThread = new MultiThreadProfiles($ChunkedProfiles, $ActiveProfile);
$AllProfilesThreads[] = $CurrentProfileThread;
$ProfilesThreadsPool->submit($CurrentProfileThread);
{
Expected Output
Expected thread creation time under 0.002sec
Actual Output
Each thread submit takes 0.02sec .
The text was updated successfully, but these errors were encountered:
Environment
Summary
Pool::Submit takes around 0.02sec for each thread. Each iteration of my foreach loop takes 0.002seconds until getting to Pool::Submit line, where time increases 10fold for each iteration, going up from 0.002 to 0.02 average .
Reproducing Code
Expected Output
Expected thread creation time under 0.002sec
Actual Output
Each thread submit takes 0.02sec .
The text was updated successfully, but these errors were encountered: