Thanks everybody for inspiring me with alternative ways of working with pools.<br /><br />I am very certain that any them will work as intended. However, they do not zero in 100% on my main intentions:<br /><br />1) easy to understand<br />2) exchangeable (seq <-> par)<br /><br /><br />A) pmap<br /><br />It origates from map and allows easy exchangeability back and forth sequential and concurrent/parallel execution.<br /><br />However, I have to admit that I have difficulties to change all the 'for loops' to map (mentally as well as for real).<br /><br />The 'for loop' IS the most used loop construct in business applications and I do not see it going away because of something else (such as map).<br /><br /><br />B) with Pool()<br /><br />It removes the need to close and join the pool which removes the visual clutter from the source code. That as such is great.<br /><br />However, exchangeability is clearly not given and the same issue concerning understandability like pmap arises.<br /><br /><br />C) apply<br /><br />Nick's approach of providing a 'call_in_background' solution comes almost close to what would solve the issues at hand.<br /><br />However, it reminds me of apply (deprecated built-in function for calling other functions). So, a better name for it would be 'bg_apply'.<br /><br /><br />All of these approaches basically rip the function call out of the programmer's view.<br /><br />It is no longer<br /><br /><span style="font-family: 'courier new', courier, monospace;">    function(arg)</span><br /><br />but<br /><br /><span style="font-family: 'courier new', courier, monospace;">    apply(function, arg)              # or</span><br /><span style="font-family: 'courier new', courier, monospace;">    bg_apply(function, arg)           # or</span><br /><span style="font-family: 'courier new', courier, monospace;">    bg_apply_many(function, args)</span><br /><br /><br />I don't see this going well in production and in code reviews.<br /><br /><br />So, an expression keyword like 'fork' would still be better at least from my perspective. It would tell me: 'it's not my responsibility anymore; delegate this to someone else and get me a handle of the future result'.<br /><br /><br />Best,<br />Sven<br/><hr>FreeMail powered by <a href="https://mail.de" target="_blank">mail.de</a> - <strong>mehr Sicherheit, Seriosität und Komfort</strong>