Comments (6)
Thats what I mean.
from lisp-koans.
Nope, purely illustrative.
from lisp-koans.
I've posted sionescu/bordeaux-threads#70 - let's see how it goes.
from lisp-koans.
Just to not the code alluded to is:
(defun signal-semaphore (semaphore)
(bordeaux-threads:signal-semaphore
(semaphore-semaphore semaphore))
(incf (semaphore-count semaphore)))
(defun wait-on-semaphore (semaphore)
(bordeaux-threads:wait-on-semaphore
(semaphore-semaphore semaphore))
(decf (semaphore-count semaphore)))
(defun semaphore-name (semaphore)
(semaphore-name (semaphore-semaphore semaphore)))
;; Incrementing a bordeaux-threads semaphore is an atomic operation
;; but our increment is not.
(defvar g-semaphore (make-our-semaphore :name "g" :count 0))
(defun semaphore-increments-g ()
(signal-semaphore g-semaphore))
(define-test test-increment-semaphore
(assert-equal ___ (semaphore-count g-semaphore))
(bordeaux-threads:join-thread (bordeaux-threads:make-thread 'semaphore-increments-g :name "S incrementor 1"))
(bordeaux-threads:join-thread (bordeaux-threads:make-thread 'semaphore-increments-g :name "S incrementor 2"))
(bordeaux-threads:join-thread (bordeaux-threads:make-thread 'semaphore-increments-g :name "S incrementor 3"))
(assert-equal ___ (semaphore-count g-semaphore)))
It's probably useful to find a semaphore count for purely testing the semaphore code,
but not for anyone else, so no great reason to export such a function.
It also bugs me I see no testing for threads in CCL
from lisp-koans.
It also bugs me I see no testing for threads in CCL
What do you mean, testing? You mean no tests for threads in CCL the implementation? I cannot see them in https://github.com/Clozure/ccl-tests/ either.
from lisp-koans.
from lisp-koans.
Related Issues (20)
- iterations.lsp test-dolist hates multiple strings in let (clisp) HOT 1
- Prefilled assert in "test-integers-can-get-really-big" (koans/type-checking.lsp) fails on x64 version of CLISP (Linux)
- We should have completed koans in a separate folder HOT 1
- DEFUN SIGN-OF is beyond repair
- Solve threading koans
- condition-handlers always error HOT 4
- scoring-project.lisp difficulty jump
- abcl has __ symbol defined in :cl-user HOT 1
- [suggestion] use bordeaux-threads for threading koans HOT 2
- Prefilled assert in "test-integers-can-get-really-big" (koans/type-checking.lsp) fails on x86 version of SBCL (Linux and Windows) HOT 2
- no function named "assert-ture" HOT 2
- CLISP runs tests in reverse order HOT 4
- Supposed mistake in koan special-forms.lsp HOT 1
- File extension is usually .lisp
- Indentation is off in almost all files
- Error in vectors.lsp HOT 3
- typo in koans/type-checking.lsp HOT 1
- how to run this HOT 7
- Can I port some tests over to Racket koans under different license? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lisp-koans.