~nilium/hardwood

20bbfedcc55e6807365971cb974ae3fd26c27f85 — Evan Hanson 7 years ago e159026
Make setup-thread use the current thread when no argument is given
2 files changed, 5 insertions(+), 4 deletions(-)

M hardwood-impl.scm
M hardwood.wiki
M hardwood-impl.scm => hardwood-impl.scm +1 -1
@@ 61,7 61,7 @@
(define-record monitor-ref monitor target tag)
(define make-tag uuid-v4)

(define (setup-thread thread)
(define (setup-thread #!optional (thread (current-thread)))
  (thread-specific-set! thread
                        (make-hardwood '()
                                       (make-mutex)

M hardwood.wiki => hardwood.wiki +4 -3
@@ 99,12 99,13 @@ Return the current process' {{pid}}.

==== setup-thread

<procedure>(setup-thread THREAD)</procedure>

{{Thread}} must be a srfi-18 thread.
<procedure>(setup-thread [THREAD])</procedure>

Make {{thread}} a hardwood process.

If given, {{thread}} must be a srfi-18 thread. Otherwise, the current
thread is used.

==== make-tag

<procedure>(make-tag)</procedure>