mcontext_thread_local.nim 408 B

12345678910111213141516
  1. # context_thread_local
  2. import ./mtasks, ./mlistdeques
  3. export mlistdeques # Exporting the type with destructor doesn't help
  4. # export tasks # solution 1. Exporting the inner type
  5. type MagicCompile = object
  6. dq: ListDeque[Task]
  7. # var x: MagicCompile # solution 2. Instantiating the type with destructors
  8. echo "Success"
  9. type
  10. TLContext* = object
  11. deque*: ListDeque[Task]