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
(defclass metalock (c2mop:standard-class) ((locks :type list :accessor locks))) (defmethod c2mop:validate-superclass ((class metalock) (metaclass standard-class)) t) (defmethod c2mop:validate-superclass ((class standard-class) (metaclass metalock)) t) (defclass locked-object () ((arr :initform "oof" :accessor arr-access)) (:metaclass metalock)) (defparameter *lock* (bt:make-lock)) ;; (defmethod c2mop:slot-value-using-class :around ((class metalock) object slotd) ;; (bt:with-lock-held (*lock*) ;; (print "lock held") ;; (let ((val (call-next-method))) ;; (print "lock dropped") ;; val))) (defun slot-names-to-lock-alist (slot-names) (check-type slot-names list) (mapcar (lambda (name) (cons name (bt:make-lock))) slot-names)) (defmethod c2mop:compute-slots ((class metalock)) (let* ((normal-slots (call-next-method)) (slot-names (mapcar #'c2mop:slot-definition-name normal-slots)) (slot-names-lock-alist (slot-names-to-lock-alist slot-names))) (cons (make-instance 'c2mop:effective-slot-definition :name 'slot-locks :initform `',slot-names-lock-alist :initfunction #'(lambda () slot-names-lock-alist) :class (find-class 'c2mop:standard-slot-definition)) normal-slots))) ;;;;error There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION SB-MOP:SLOT-DEFINITION-ALLOCATION (3)> when called with arguments (#<SB-MOP:EFFECTIVE-SLOT-DEFINITION METALOCK::SLOT-LOCKS>). [Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR] Restarts: 0: [RETRY] Retry calling the generic function. 1: [RETRY] Retry SLY mREPL evaluation request. 2: [*ABORT] Return to SLY's top level. 3: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {1004D04BD3}>) Backtrace: 0: ((:METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION SB-MOP:SLOT-DEFINITION-ALLOCATION (3)> #<SB-MOP:EFFECTIVE-SLOT-DEFINITION METALOCK::SLOT-LOCKS>) [fast-method] 1: ((LAMBDA (SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.MORE-CONTEXT. SB-PCL::.MORE-COUNT.)) #<STANDARD-GENERIC-FUNCTION SB-MOP:SLOT-DEFINITION-ALLOCATION (3)> #<SB-MOP:EFFECTIVE-SLOT-DEFINITION METALOCK::SLOT.. 2: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION SB-MOP:SLOT-DEFINITION-ALLOCATION (3)> (#<SB-MOP:EFFECTIVE-SLOT-DEFINITION METALOCK::SLOT-LOCKS>)) 3: (SB-PCL::STD-COMPUTE-SLOTS-AROUND #<METALOCK METALOCK::LOCKED-OBJECT> (#<SB-MOP:EFFECTIVE-SLOT-DEFINITION METALOCK::SLOT-LOCKS> #<SB-MOP:STANDARD-EFFECTIVE-SLOT-DEFINITION METALOCK::ARR>)) 4: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-PCL::UPDATE-CLASS)) 5: ((FLET "WITHOUT-INTERRUPTS-BODY-29" :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK)) 6: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK #<CLOSURE (FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-PCL::UPDATE-CLASS) {7F7C3D1BC9EB}> #<SB-THREAD:MUTEX "World Lock" owner: #<SB-THREAD:THREAD "sly-channe.. 7: ((LABELS SB-PCL::REC :IN SB-PCL::UPDATE-CLASS) #<METALOCK METALOCK::LOCKED-OBJECT> T NIL) 8: ((:METHOD MAKE-INSTANCE (CLASS)) #<METALOCK METALOCK::LOCKED-OBJECT>) [fast-method] 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (MAKE-INSTANCE (QUOTE LOCKED-OBJECT)) #<NULL-LEXENV>) 10: (EVAL (MAKE-INSTANCE (QUOTE LOCKED-OBJECT))) 11: ((LAMBDA NIL :IN SLYNK-MREPL::MREPL-EVAL-1)) --more--