tsharedlist.nim 180 B

123456789101112131415161718
  1. import sharedlist
  2. var
  3. list: SharedList[int]
  4. count: int
  5. init(list)
  6. for i in 1 .. 250:
  7. list.add i
  8. for i in list:
  9. inc count
  10. doAssert count == 250
  11. deinitSharedList(list)