[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] ssax egg
From: |
Bruce Butterfield |
Subject: |
[Chicken-users] ssax egg |
Date: |
Fri, 14 May 2004 17:11:53 -0700 |
User-agent: |
Mozilla Thunderbird 0.6 (X11/20040509) |
After some discussion with other SSAX users a while back, a change to
the input parsing code (core.scm in the chicken port) makes it
thread-safe which is very important to my application. The default code
uses a static buffer which as you might suspect doesn't work at all well
in a multi-threaded environment. The updated code replaces
input-parse:init-buffer as follows:
(define input-parse-buffer (make-parameter #f))
(define input-parse:init-buffer
(lambda ()
(or
(input-parse-buffer)
(let ((buffer (make-string 512)))
(input-parse-buffer buffer)
buffer))))
This code is slower than the default static buffer; perhaps someone
could think of a clever runtime mechanism to use one mechanism over the
other???
--
Patriotism is your conviction that this country is superior to all
others because you were born in it.
George Bernard Shaw
- [Chicken-users] ssax egg,
Bruce Butterfield <=