<commit_before>#|
Copyright 2006,2007 <NAME>

Distributed under the MIT license (see LICENSE file)
|#

(in-package #:bordeaux-threads)

;;; Thread Creation

(defmethod make-thread (function &key name)
  (ext:make-thread function :name name))

(defmethod current-thread ()
  (ext:current-thread))

(defmethod thread-name (thread)
  (ext:thread-name thread))

;;; Yes, this is nasty
(defmethod threadp (object)
  (handler-case (progn (thread-name object) t)
    (type-error () nil)))

;;; Resource contention: locks and recursive locks

;;; Don't know what the arguments to MAKE-THREAD-LOCK are, but it
;;; doesn't mind being a thunk
(defmethod make-lock (&optional name)
  (declare (ignore name))
  (ext:make-thread-lock))<commit_msg>Added location of Armed Bear threading implementation.<commit_after>#|
Copyright 2006,2007 <NAME>

Distributed under the MIT license (see LICENSE file)
|#

(in-package #:bordeaux-threads)

;;; the implementation of the Armed Bear thread interface can be found in
;;; src/org/armedbearlisp/LispThread.java

;;; Thread Creation

(defmethod make-thread (function &key name)
  (ext:make-thread function :name name))

(defmethod current-thread ()
  (ext:current-thread))

(defmethod thread-name (thread)
  (ext:thread-name thread))

;;; Yes, this is nasty
(defmethod threadp (object)
  (handler-case (progn (thread-name object) t)
    (type-error () nil)))

;;; Resource contention: locks and recursive locks

;;; Don't know what the arguments to MAKE-THREAD-LOCK are, but it
;;; doesn't mind being a thunk
(defmethod make-lock (&optional name)
  (declare (ignore name))
  (ext:make-thread-lock))
{'fraction_non_alphanumeric': 0.1311576354679803, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 4.88768115942029, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2052226', 'n_tokens_mistral': 541, 'n_tokens_neox': 510, 'n_words': 170}