further progress for multi-threading
This commit is contained in:
parent
9b460a71ce
commit
c70fa87471
10 changed files with 207 additions and 181 deletions
|
|
@ -116,12 +116,16 @@ type
|
|||
|
||||
when not defined(useNimRtl):
|
||||
proc initReprClosure(cl: var TReprClosure) =
|
||||
# Important: cellsets does not lock the heap when doing allocations! We
|
||||
# have to do it here ...
|
||||
when hasThreadSupport and defined(heapLock): AquireSys(HeapLock)
|
||||
Init(cl.marked)
|
||||
cl.recdepth = -1 # default is to display everything!
|
||||
cl.indent = 0
|
||||
|
||||
proc deinitReprClosure(cl: var TReprClosure) =
|
||||
Deinit(cl.marked)
|
||||
when hasThreadSupport and defined(heapLock): ReleaseSys(HeapLock)
|
||||
|
||||
proc reprBreak(result: var string, cl: TReprClosure) =
|
||||
add result, "\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue