I understand that in general a List is not thread safe, however is there anything wrong with simply adding items into a list if the threads never perform any other operation
I solved my problem using ConcurrentBag instead of List like this:
ConcurrentBag list = new ConcurrentBag(); Parallel.ForEach(transactions, tran => { list.Add(new object()); });