Skip to content

Instantly share code, notes, and snippets.

@zacharycarter
Created August 4, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zacharycarter/e44274861f211bb2345d4fb2a1bd87a6 to your computer and use it in GitHub Desktop.
Save zacharycarter/e44274861f211bb2345d4fb2a1bd87a6 to your computer and use it in GitHub Desktop.
type
CircAlloc* [Size: static[int] , T] = tuple # Better less overhead
baseArray : array[Size,T]
index : uint16
type
Job = object of RootObj
var foo {.threadvar.}: CircAlloc[1,Job]
when isMainModule:
echo "Hello World!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment