The PLC execution is a single threaded so at any one time, only one Custom function may be executed and therefore the NETCMD$ will have to be completed before the custom function can return. Hence there is no possibility of two NETCMD$ being executed simultaneously.