~nilium/hardwood

d0ab58a7a88b742340e0f0046557947c6eef2bb9 — Noel Cower 3 years ago af0de71
Update for Chicken 5

Update hardwood for Chicken 5 support.

  * Add a .egg file to build for Chicken 5.

  * Replace data-structures with queues. Looking at whether it's
    feasible to replace the queues with mailboxes to reduce the amount
    of work spent on them, at the cost of putting the primordial thread
    off limits for a process. For now, though, tests pass, so it's
    a start.

  * Replace uuid with ksuid. There is little reason for this other than
    that I know the ksuid egg and prefer it.
6 files changed, 32 insertions(+), 16 deletions(-)

M hardwood-impl.scm
A hardwood.egg
M hardwood.scm
M hardwood.wiki
M tests/monitors.scm
M tests/run.scm
M hardwood-impl.scm => hardwood-impl.scm +11 -7
@@ 27,12 27,16 @@
;; ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
;; POSSIBILITY OF SUCH DAMAGE.

(use
  data-structures
  matchable
  srfi-1
  srfi-18
  uuid)
 (import scheme
         (chicken base)
         (chicken condition)
         matchable
         queues
         srfi-1
         srfi-18
         ksuid)

(import-for-syntax srfi-1)

(define timeout-condition
  (make-composite-condition (make-property-condition 'exn


@@ 59,7 63,7 @@
(define-record pid thread)
(define-record hardwood tail lock signal pid monitors monitors-lock)
(define-record monitor-ref monitor target tag)
(define make-tag uuid-v4)
(define make-tag ksuid)

(define (setup-thread #!optional (thread (current-thread)))
  (thread-specific-set! thread

A hardwood.egg => hardwood.egg +8 -0
@@ 0,0 1,8 @@
((synopsis "An actor model library, inspired by Erlang")
 (version "0.5")
 (author "Adrien Ramos")
 (components (extension hardwood))
 (license "BSD")
 (category hell)
 (dependencies matchable uuid)
 (test-dependencies test))

M hardwood.scm => hardwood.scm +1 -3
@@ 48,8 48,6 @@
         timeout-condition
         timeout-condition?)

(import scheme chicken)
 "hardwood-impl.scm")

(include "hardwood-impl")

)

M hardwood.wiki => hardwood.wiki +1 -1
@@ 11,7 11,7 @@ will. Also, some incompatibilities are to be expected.'''
== Requirements

* [[matchable]]
* [[uuid]]
* [[ksuid]]

== Bugs and Limitations


M tests/monitors.scm => tests/monitors.scm +2 -0
@@ 1,3 1,5 @@
(import (chicken condition))

(test-group "Monitors"

  (define (monitors-test)

M tests/run.scm => tests/run.scm +9 -5
@@ 1,10 1,14 @@
(use test hardwood)
(import test
        hardwood
        (chicken load)
        generic-functions
        generic-helpers)

(setup-thread)

(load "ping")
(load "rpc")
(load "spam")
(load "monitors")
(load-relative "ping")
(load-relative "rpc")
(load-relative "spam")
(load-relative "monitors")

(test-exit)