Hi,
Andy Wingo skribis:
> On Wed 08 Feb 2012 05:03, Nala Ginrut writes:
>
>> Well, what if I want to avoid to create new thread repeatedly?
>> I mean recycle or pre-allocate a bunch of threads, then reuse them.
>> How can I reuse a thread-object in Guile?
>
> If I understand you correctly, you
On Wed 08 Feb 2012 05:03, Nala Ginrut writes:
> Well, what if I want to avoid to create new thread repeatedly?
> I mean recycle or pre-allocate a bunch of threads, then reuse them.
> How can I reuse a thread-object in Guile?
If I understand you correctly, you would use a thread pool. You'd buil
tion, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> ;; 02110-1301 USA
>
> ;;; Commentary:
> ;;;
> ;;; A simple thread pool implementation.
> ;;;
> ;;; Code:
>
> (define-module (ice-9 thread-pool)
> #:use-module (srfi srfi-9)
> #:use-module (srfi srfi-9 gnu)
>
Hi Andy!
Andy Wingo skribis:
> Related to my previous mail, here is a thread pool implementation.
> Comments welcome.
What use case do you have in mind? “Thread pool” seems too generic to
really have anything to say about it. :-)
Thanks,
Ludo’.
, Boston, MA
;; 02110-1301 USA
;;; Commentary:
;;;
;;; A simple thread pool implementation.
;;;
;;; Code:
(define-module (ice-9 thread-pool)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
#:use-module (ice-9 threads)
#:export (make-thread-pool
start-thread-pool