Script adding rows to dataset works perfect in 7.9 fails in 8!

I have been using this little tactic in my scripts for some time and now with Ignition 8 it is failing to always add all the rows. Is there something that I should be doing different now?

 for item in items:
     rowlist ="[client]unloaditems").value
     newrow = [item['uid'], item['itemnum'], item['itemdescription'], item['qty'], item['units'], item['confirmedunload']]
     newlist = system.dataset.addRow(rowlist, newrow)
     system.tag.write("[client]unloaditems", newlist)

You are reading the value of the client tag inside the loop and then writing back to it.
system.tag.write is asynchronous, so it does not wait for the write to occur before returning.
You should do something like the following:

unloadItemsDS = system.tag.getTagValue("[client]unloaditems")
rowsToAppend = []
for item in items:
	rowsToAppend.append([item['uid'], item['itemnum'], item['itemdescription'], item['qty'], item['units'], item['confirmedunload']])
unloadItemDS = system.dataset.addRows(unloadItemsDS,rowsToAppend)

Thanks so much. I thought that you actually had to call Asynch. Works perfect now.