Hello again,

I audited the symbol.d and package.d code today, and wrote down some
notes about possible future improvements.  Some things have to do
with locking, and since we were already on that topic earlier:

Although GENSYM is more often used in the compile phase (which is
single-threaded, at least for now), it can also be used by
multithreaded user code at runtime.  Because GENSYM is standard,
it's unlikely that user code would expect to have to use a lock to
avoid its internal race conditions around *GENSYM-COUNTER*.  So
possibly that GENSYM should implicitely use a lock, held the whole time
between the getf and setf.

I wondered if a lock was also required for *PACKAGE* access in
IN-PACKAGE, but I'm unsure, as theoretically every thread has its own
local *PACKAGE*; but I'm unsure where this binding gets created, I only
see the ECL_SETQ to set the new package, I might have missed a LET-like
binding creation operation.  I see a ecl_bds_bind() call for
*current-process* only in process.d.  There's some bindings related
code in process_alloc() but I don't think it handles this either.

Thanks,
-- 
Matt

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to