On my mac (10.15.7 - Catalina) running Swi-Prolog (8.3.27), I have a problem with concurrent_maplist/3 not terminating even after 12 hours of processing
cache(Cache, U):- phrase(inventory, L) % , maplist(file_index, L, U) , concurrent_maplist(file_index, L, U) . file_index(Dir-f(Item, Path, Hash, Size, Time), Hash-u(Dir, f(Item, Path, Hash, Size, Time))):-!, crypto_file_hash(Path, Hash, [encoding(octet), algorithm(md5)]). file_index(Dir-d(Item, Path, Hash), Hash-u(Dir, d(Item, Path))).
Essentially, inventory//0 returns a list of files and directories (ca 7.000), for which I want to compute a hash.
Using the same routine with maplist/3 finishes as expected after ca 400 seconds.
Is there anything I am doing wrong with concurrent_maplist?
N.B. Running the same code with swipl 8.2.4 works like a charm.