5.13 Operating System Threads
(require ffi/unsafe/os-thread) | package: base |
Added in version 6.90.0.9 of package base.
procedure
procedure
(call-in-os-thread thunk) → void?
thunk : (-> any)
The thunk is run in atomic mode, and it must not inspect its continuation or use any Racket thread functions (such as thread or current-thread), any Racket synchronization functions (such as semaphore-post or sync), or any parameters (such as current-output-port). Variables may be safely mutated with set!, and vectors, mutable pairs, boxes, mutable structure fields, and eq?- and eqv?-based hash tables can be mutated, but the visibility of mutations to other threads is unspecified except as synchronized through os-semaphore-wait and os-semaphore-post.
procedure
(make-os-semaphore) → any
procedure
(os-semaphore-post sema) → void?
sema : any/c
procedure
(os-semaphore-wait sema) → void?
sema : any/c