I have written a code that takes directory as input and outputs list of files in it.I implemented it in single thread.what to do in order to implement using multiple threads? pr
global Queue ( consists of folders in a drive/directory ) Local Queue ( inside Thread function for Subfolders )
while(true)
{
lock()
if( Global q empty)
unlock
break
else
get first folder from global q
put it in local q
unlock
while(local q not empty)
take first folder from local q
process it
if( folder)
put it in local q
else
put it in vector ( othr purpose)
}