Skip to content

Commit

Permalink
Update typedthreads.nim
Browse files Browse the repository at this point in the history
  • Loading branch information
mk1nz committed Jan 11, 2025
1 parent d555881 commit 2686229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/typedthreads.nim
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ when hostOS == "windows":
## Entry point is the proc `tp`.
## `param` is passed to `tp`. `TArg` can be `void` if you
## don't need to pass any data to the thread.
t.core = cast[PGcThread](allocThreadStorage(sizeof(GcThread)))
t.core.store cast[PGcThread](allocThreadStorage(sizeof(GcThread)))

when TArg isnot void: t.data.store param
t.dataFn.store tp
Expand All @@ -242,7 +242,7 @@ elif defined(genode):
proc createThread*[TArg](t: var Thread[TArg],
tp: proc (arg: TArg) {.thread, nimcall.},
param: TArg) =
t.core = cast[PGcThread](allocThreadStorage(sizeof(GcThread)))
t.core.store cast[PGcThread](allocThreadStorage(sizeof(GcThread)))

when TArg isnot void: t.data.store param
t.dataFn.store tp
Expand Down

0 comments on commit 2686229

Please sign in to comment.