Plaster
New
List
Login
text
apl
aspx
asterisk
brainfuck
c
c++hdr
c++src
cassandra
ceylon
clojure
clojurescript
cmake
cobol
coffeescript
common-lisp
crystal
csharp
css
cypher-query
cython
d
dart
diff
django
dockerfile
dylan
ebnf
ecl
ecmascript
edn
eiffel
ejs
elm
erb
erlang
ez80
factor
fcl
feature
forth
fortran
fragment
gfm
go
gql
groovy
gss
haml
handlebars-template
haskell
haxe
hive
html
http
httpd-php
httpd-php-open
hxml
ini
java
javascript
json
jsp
jsx
julia
kotlin
latex
less
literate-haskell
lua
mariadb
markdown
mbox
mirc
mscgen
msgenny
mssql
mumps
mysql
n-triples
nesc
nginx-conf
nsis
objectivec
octave
oz
pascal
perl
pgp
pgp-keys
pgp-signature
pgsql
php
pig
plsql
properties
protobuf
puppet
python
q
rpm-changes
rpm-spec
rsrc
ruby
rustsrc
sas
sass
scala
scheme
scss
sieve
slim
smarty
solr
soy
sparql-query
spreadsheet
sql
squirrel
stex
styl
swift
systemverilog
tcl
textile
tiddlywiki
tiki
tlv
tornado
ttcn-asn
ttcn-cfg
turtle
twig
typescript
typescript-jsx
vb
vbscript
velocity
verilog
vertex
vhdl
vue
webidl
xml
xml-dtd
xquery
xu
yaml
z80
default
Visibility:
public
unlisted
private
# HG changeset patch # User Mark <evenson.not.org@gmail.com> # Date 1591433318 -7200 # Sat Jun 06 10:48:38 2020 +0200 # Node ID 6fd5dd55d070fbf5ddc6ecb389c9535218a39095 # Parent 6747ec085780a0da0a6d65f719db593d144d251c INCOMPLETE working through lock problems on ABCL diff -r 6747ec085780 -r 6fd5dd55d070 dependent.lisp --- a/dependent.lisp Sun May 10 11:41:04 2020 +0200 +++ b/dependent.lisp Sat Jun 06 10:48:38 2020 +0200 @@ -553,6 +553,12 @@ (defun make-process-lock (name) (mp:make-recursive-mutex name)) +#+abcl +(defun make-process-lock (name) + (threads:make-mutex + :name name "Anonymous lock" + :lock (jnew "java.util.concurrent.locks.ReentrantLock"))) + ;;; HOLDING-LOCK: Execute a body of code with a lock held. ;;; The holding-lock macro takes a timeout keyword argument. EVENT-LISTEN @@ -622,6 +628,13 @@ `(:timeout ,timeout))) ,@body)) +#+(or) ;; How to implement a timeout? +(defmacro holding-lock ((lock display &optional (whostate "CLX wait") + &key timeout) + &body body) + (declare (ignore display whostate)) + (threads:with-thread-lock (lock))) + ;;; WITHOUT-ABORTS ;;; If you can inhibit asynchronous keyboard aborts inside the body of this