summary refs log tree commit diff stats
path: root/lib/std/jsonutils.nim
diff options
context:
space:
mode:
authorTail Wag Games <carterza@gmail.com>2021-10-29 06:42:44 -0500
committerGitHub <noreply@github.com>2021-10-29 13:42:44 +0200
commitcfdac6666f5772479724e082fb08c2db694d8d40 (patch)
tree466b8a3add8c9a5c298bc23ca5b30d338cec811e /lib/std/jsonutils.nim
parentee703c5db4ceb8d0228b4429c53d85d5f1ff91ea (diff)
downloadNim-cfdac6666f5772479724e082fb08c2db694d8d40.tar.gz
Freeing critical sections via atexit in system/alloc and system/io (#19062)
* adding new system module sysexitprocs and including system exit procedures when registering exit handlers defined in userland

* fixing failing tests and adding initialization guard to handle cases where the module's global init logic isn't invoked first as is the case with some gc implementaions

* js backend shouldn't try to invoke actual system exit procs

* fixing formatting in sysexitprocs.nim

* 256 was too much - my max number of plugins in my engine is 64 and I require two hooks per runtime it looks like with tls emulation turned off, so for my purposes 128 should be sufficient

* so atExit should be enough here, can get rid of all the extra cruft I had added on top since I didn't realize atExit already provided a stack

* done being cute - since newruntime prevents correct cpp codegen for object variants apparently and breaks tests if I try to use std/exitprocs, ddSysExitProc is just going into both modules. Since system doesn't include system/io, polluting system with it doesn't make sense either... at least it is only importc'd when it is required in either module and we don't have to have any weird when defined(nimOwnedEnabled) with a comment explaining why
Diffstat (limited to 'lib/std/jsonutils.nim')
0 files changed, 0 insertions, 0 deletions
/a> 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316